-
Notifications
You must be signed in to change notification settings - Fork 5
/
vue.config.js
90 lines (81 loc) · 1.8 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
88
89
90
/* eslint-disable max-lines-per-function */
const globalSassFiles = [
]
module.exports = {
publicPath: "./",
css: {
requireModuleExtension: true,
loaderOptions: {
sass: {
additionalData: globalSassFiles.map((src)=>"@import \"" + src + "\";").join("\n")
}
},
},
chainWebpack: (config) => {
config
.plugin("html")
.tap(args => {
args[0].title = "WeavrDAO";
return args;
})
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule
.use("file-loader")
.loader("file-loader")
.tap(options => {
const newOptions = {
symbolId: "[name][hash]",
esModule: false
};
return { ...options, ...newOptions };
})
.end()
config.module
.rule("images")
.use("url-loader")
.loader("url-loader")
.tap(
options => Object.assign(options, {
esModule: false
})
)
.end()
config.module
.rule("vue")
.use("vue-loader")
.tap((options) => {
const transformAssetUrls = options.transformAssetUrls || {}
return {
...options,
transformAssetUrls: {
video: ["src", "poster"],
source: "src",
img: "src",
image: "xlink:href",
// ..others
...transformAssetUrls,
},
}
})
.end()
// in your loaders:
config.module
.rule('toml')
.test(/\.toml$/)
.use('@lcdev/toml-loader')
.loader('@lcdev/toml-loader')
.end()
config.merge({
devServer: {
proxy: {
"/api": {
ws: true,
changeOrigin: true,
target: "'https://api.sumsub.com'"
}
}
}
})
},
};