-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
88 lines (81 loc) · 2.07 KB
/
vue.config.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const { argv } = require("yargs");
const path = require("path");
const webpack = require("webpack");
module.exports = {
productionSourceMap: false,
transpileDependencies: ["vuetify"],
configureWebpack: {
// entry: {
// app: [
// './src/main.js'
// ]
// },
optimization: {
// We no not want to minimize our code.
minimize: true,
},
resolve: {
alias: {
"@": require("path").resolve(__dirname, "src"),
},
extensions: [".js", ".vue", ".json", ".ts"],
},
},
devServer: {
proxy: "http://localhost:8000",
headers: { "Access-Control-Allow-Origin": "*" },
watchOptions: {
clientLogLevel: "warning",
},
},
// publicPath: '',
// outputDir: "./devcore-cordova/www/",
outputDir: "../devcore_server_lavarel/public/mobile",
publicPath: "./",
pluginOptions: {
cordovaPath: "devcore-cordova",
},
chainWebpack: (config) => {
console.log("_________________");
console.log(`Building app with environment: ${process.env.BASE}`);
console.log("_________________");
config.resolve.alias.set("@", path.join(__dirname, "./src"));
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule
.oneOf("inline")
.resourceQuery(/inline/)
.use("vue-svg-loader")
.loader("vue-svg-loader")
.options({
svgo: {
plugins: [{ removeDimensions: true }, { removeViewBox: false }],
},
})
.end()
.end()
.oneOf("external")
.use("file-loader")
.loader("file-loader")
.options({
name: "assets/[name].[hash:8].[ext]",
});
config.module
.rule("vue")
.use("vue-loader")
.loader("vue-loader")
.tap((options) => {
options.transformAssetUrls = {
img: "src",
image: "xlink:href",
"b-avatar": "src",
"b-img": "src",
"b-img-lazy": ["src", "blank-src"],
"b-card": "img-src",
"b-card-img": "src",
"b-embed": "src",
};
return options;
});
},
};