-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.mix.default.js
64 lines (58 loc) · 2.38 KB
/
webpack.mix.default.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const mix = require('laravel-mix');
mix.options({
hmrOptions: {
host: 'localhost',
port: '8079'
},
});
mix.webpackConfig({
devServer: {
port: '8079'
},
});
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.webpackConfig({
resolve: {
modules: [
'node_modules',
'vendor/tightenco',
'vendor/motor-cms',
'vendor/partymeister',
'resources/assets/js',
'packages'
],
alias: {
"ziggy": path.resolve('resources/assets/js/ziggy.js'),
"ziggy-route": path.resolve('vendor/tightenco/ziggy/src/js/route.js'),
},
extensions: [".webpack.js", ".web.js", ".js", ".json", ".less"]
}
});
mix
.js('resources/assets/js/project.default.js', 'public/js/motor-backend.js')
.js('@partymeister-frontend/resources/assets/js/partymeister-livevoting/main.js', 'public/js/partymeister-livevoting.js')
.js('@partymeister-slides/resources/assets/js/partymeister-slidemeister-web/main.js', 'public/js/partymeister-slidemeister-web.js')
.js('@partymeister-frontend/resources/assets/js/partymeister-frontend/main.js', 'public/js/partymeister-frontend.js')
.js('@partymeister-slides/resources/assets/js/partymeister-slides/partymeister-slides-frontend.js', 'public/js/partymeister-slides-frontend.js')
.sourceMaps()
.sass('resources/assets/sass/project.default.scss', 'public/css/motor-backend.css')
.sass('@partymeister-frontend/resources/assets/sass/partymeister-livevoting.scss', 'public/css')
.sass('@partymeister-slides/resources/assets/sass/partymeister-slidemeister-web.scss', 'public/css')
.sass('@partymeister-accounting/resources/assets/sass/partymeister-accounting-pos.scss', 'public/css')
.sass('@partymeister-frontend/resources/assets/sass/partymeister-frontend.scss', 'public/css')
// APP RESOURCES
.copy('resources/fonts/*.*', 'public/fonts')
.copy('resources/assets/images/*.*', 'public/images')
;
if (mix.config.inProduction) {
mix.version();
}