-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.app.js
43 lines (36 loc) · 994 Bytes
/
webpack.app.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
let mix = require("laravel-mix");
const path = require("path");
require("laravel-mix-merge-manifest");
mix.webpackConfig({
output: {
chunkFilename: mix.inProduction()
? "js/chunks/[name].[chunkhash].js"
: "js/chunks/[name].js"
},
resolve: {
alias: {
modules: path.resolve(__dirname, "./node_modules"),
vue$: "vue/dist/vue.common.js"
},
extensions: ["*", ".js", ".ts", ".vue", ".json"],
symlinks: false
}
});
mix.options({
processCssUrls: false
}).setPublicPath("public");
console.log("Compiling - client only app");
mix.js("resources/assets/web/js/index.js", "public/assets/example/js/app.js").vue();
mix.sass("resources/assets/web/scss/style.scss", "public/assets/example/css/app.css");
mix.extract(
[
"axios",
"vue",
"vue-router"
],
"public/assets/example/js/vendor.js"
);
if (mix.inProduction()) {
mix.version();
}
mix.mergeManifest();