-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
33 lines (29 loc) · 868 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
const mix = require('laravel-mix');
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin');
const CompressionPlugin = require('compression-webpack-plugin');
mix.webpackConfig({
resolve: {
// We need to define the @ in order to tell the compiler what does the @ uses for.
extensions: ['.js', '.vue'],
alias: {
'@': __dirname + '/resources/js'
}
},
plugins: [
new VuetifyLoaderPlugin(),
new CompressionPlugin({
algorithm: 'gzip',
compressionOptions: { level: 9 },
filename: '[path].gz[query]',
threshold: 1400,
minRatio: 1
})
]
});
mix.js('resources/js/main.js', 'public/js');
// FIX: PostCSS warning that it does nothing, no plugin is set
mix.options({
postCss: [
require('autoprefixer'),
],
})