-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathwebpack.mix.js
49 lines (43 loc) · 1.32 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
46
47
48
49
const mix = require('laravel-mix');
const cssImport = require('postcss-import')
const cssNesting = require('postcss-nesting')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.vue()
.postCss('resources/css/app.css', 'public/css', [
cssImport(),
cssNesting(),
require('tailwindcss'),
require('autoprefixer'),
])
.alias({
'@': 'resources/js',
});
mix.webpackConfig({
devServer: {
host: '0.0.0.0',
port: 8080,
},
});
mix.webpackConfig({
output: {
// Overrides the default 0.0.0.0 host (from above) to use localhost when
// creating URLs, since the 0.0.0.0 address doesn't work when the
// HMR server reloads in Chrome
publicPath: `http://localhost:8080/`,
},
});
/** https://stackoverflow.com/questions/50587679/vue-loader-15-with-laravel-mix **/
if (mix.inProduction()) {
mix.version()
mix.disableNotifications()
}