-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.mix.js
42 lines (39 loc) · 1.21 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
const mix = require('laravel-mix');
require('laravel-mix-polyfill');
mix.webpackConfig({
module: {
rules: [{
test: /\.jsx?$/,
exclude: /(bower_components)/,
use: [
{
loader: 'babel-loader',
options: mix.config.babel()
},
],
}],
}
});
mix.setPublicPath('./assets')
.js('./src/js/frontend/main.js', './assets/js/frontend')
// .babel('./assets/js/frontend/main.js', './assets/js/frontend/main.js')
.js('./src/js/admin/admin.js', './assets/js/admin')
.js('./src/js/backend/backend.js', './assets/js/backend')
.sass('./src/scss/frontend/frontend.scss', './assets/css')
.sass('./src/scss/builder/builder.scss', './assets/css')
.sass('./src/scss/backend/backend.scss', './assets/css')
.sass('./src/scss/admin/admin.scss', './assets/css')
.polyfill({
enabled: true,
useBuiltIns: 'usage',
targets: {'ie': 11}
})
.options({
processCssUrls: false,
postCss: [
require('autoprefixer'),
require('css-mqpacker')
],
});
// disable mix-manifest.json
Mix.manifest.refresh = _ => void 0;