forked from rapidez/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
35 lines (33 loc) · 1009 Bytes
/
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
const mix = require('laravel-mix');
const path = require('path');
const BundleTracker = require('webpack-bundle-tracker');
mix
.setPublicPath('public')
.js('resources/js/app.js', 'public/js').vue()
.extract({
test(module) {
let moduleName = module.nameForCondition()
return !moduleName.includes('@appbaseio/reactivesearch-vue')
&& !moduleName.includes('vue-slider-component')
&& moduleName.includes('node_modules')
}
})
.postCss('resources/css/app.css', 'public/css', [
require('tailwindcss'),
]).alias({
'Vendor': path.join(__dirname, 'vendor'),
}).options({
terser: {
extractComments: false,
}
}).webpackConfig({
output: {
chunkFilename: 'js/[name].js?id=[chunkhash]',
},
plugins: [
new BundleTracker({filename: './public/webpack-stats.json'})
]
});
if (mix.inProduction()) {
mix.version();
}