-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
45 lines (40 loc) · 1.07 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
43
44
45
const path = require('path');
const mix = require('laravel-mix');
const source = 'resources';
const public = 'public';
mix.setPublicPath(path.normalize(public));
mix.webpackConfig({
externals: {
'jquery': 'jQuery',
'vue': 'Vue',
'popper.js': 'Popper'
},
devServer: { overlay: true },
devtool: 'source-map',
resolve: {
/* Path Shortcuts */
alias:{
/* root */
'~': path.resolve(__dirname, `${ source }/js`),
Components: path.resolve(__dirname, `${ source }/js/components`),
Layouts: path.resolve(__dirname, `${ source }/js/layouts`),
Views: path.resolve(__dirname, `${ source }/js/views`)
}
}
});
mix.js(`${ source }/js/myapp.js`, `${ public }/js`).extract().vue();
mix.sass(`${ source }/sass/myapp.scss`, `${ public }/css`);
mix.sourceMaps();
mix.browserSync({
proxy: 'laratt.test',
host: 'laratt.test',
files: [
`${ source }/views/**/*.php`,
`${ public }/js/**/*.js`,
`${ public }/css/**/*.css`
],
browser: 'firefox',
ghostMode: false,
open: 'external'
});
mix.version().disableNotifications();