forked from craftcms/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
47 lines (42 loc) · 1020 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
36
37
38
39
40
41
42
43
44
45
46
47
let mix = require('laravel-mix');
mix.webpackConfig({
externals: {
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios'
}
});
const sourcePath = 'src/web/assets/pluginstore/src';
const distPath = 'src/web/assets/pluginstore/dist';
mix.setPublicPath(distPath);
mix.options({
sourcemaps: 'source-map',
uglify: {
sourceMap: true,
uglifyOptions: {
sourceMap: true,
compress: {
warnings: false,
drop_console: true,
},
output: {
comments: false
}
}
},
postCss: [
require('autoprefixer')({
grid: true,
browsers: ['ie > 11'],
})
]
});
mix
.js(sourcePath + '/js/main.js', 'js')
.sass(sourcePath + '/sass/main.scss', 'css')
.options({
processCssUrls: false
})
.copy(sourcePath + '/images', distPath + '/images/')
.sourceMaps();