-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.mix.js
More file actions
36 lines (34 loc) · 993 Bytes
/
webpack.mix.js
File metadata and controls
36 lines (34 loc) · 993 Bytes
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
const mix = require("laravel-mix");
const path = require("path");
mix.js("resources/js/app.js", "public/js")
.vue()
.postCss("resources/css/app.css", "public/css", [require("tailwindcss")])
.sourceMaps()
.alias({
"@": path.resolve("resources/js"),
ziggy: path.resolve("vendor/tightenco/ziggy/dist"),
})
.webpackConfig((webpack) => {
return {
// stats: {
// children: false,
// },
plugins: [
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: false,
}),
],
};
});
if (mix.inProduction()) {
mix.version();
} else {
mix.options({
// https://github.com/JeffreyWay/laravel-mix/blob/c67ff394bfffead9a1e2bc71ac97559e394e4cfe/src/config.js#L24
hmrOptions: {
host: "localhost",
port: +process.env.MIX_HMR_PORT,
},
});
}