forked from spatie/blender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
40 lines (33 loc) · 1.28 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
const { mix } = require('laravel-mix');
mix
.js('resources/assets/js/front/head.js', 'public/js/front.head.js')
.js('resources/assets/js/front/app.js', 'public/js/front.app.js')
.sass('resources/assets/sass/front/front.scss', 'public/css/front.css')
.js('resources/assets/js/back/head.js', 'public/js/back.head.js')
.js('resources/assets/js/back/app.js', 'public/js/back.app.js')
.sass('resources/assets/sass/back/back.scss', 'public/css/back.css')
.version()
.options({
// Since we don't do any image preprocessing and write url's that are
// relative to the site root, we don't want the sass loader to try to
// follow paths in `url()` functions.
processCssUrls: false,
})
.webpackConfig({
output: {
// The public path needs to be set to the root of the site so
// Webpack can locate chunks at runtime.
publicPath: '/',
},
module: {
rules: [
// With the `import-glob-loader` we can use globs in our import
// statements in scss.
{
test: /\.scss/,
loader: 'import-glob-loader',
enforce: 'pre',
},
],
},
});