-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
52 lines (46 loc) · 1.68 KB
/
webpack.mix.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
const plugin = 'resources/js/plugins/';
const src_path = 'resources/js/';
mix.webpackConfig({
resolve: {
alias: {
'@src': path.resolve(__dirname, src_path),
'@components': path.resolve(__dirname, src_path + 'components'),
'@common': path.resolve(__dirname, src_path + 'common'),
'@public': path.resolve(__dirname, '/public'),
}
}
});
mix.js('resources/js/app.js', 'public/js')
.extract([
'vue',
'axios',
'datatables.net',
'datatables.net-dt',
])
.combine([
//plugin + 'jquery/jquery-3.5.1.min.js',
//plugin + 'datatables-net/js/jquery.dataTables.min.js',
//plugin + 'datatables-net/js/dataTables.bootstrap4.min.js',
//plugin + 'datatables-net/extensions/dataTables.select.min.js',
], 'public/js/theme.js')
.sass('resources/sass/app.scss', 'public/css')
.combine([
//plugin + 'datatables-net/css/jquery.dataTables.min.css',
//plugin + 'bootstrap/css/bootstrap.min.css',
//plugin + 'datatables-net/css/dataTables.bootstrap4.min.css',
//plugin + 'datatables-net/extensions/select.dataTables.min.css',
], 'public/css/theme.css');
if (mix.inProduction()) {
mix.version();
}