forked from gqgs/3x3-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
47 lines (44 loc) · 1.15 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
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
chainWebpack: config => {
config.module
.rule("vue")
.use("vue-loader")
.tap(options => {
options.compilerOptions = {
...options.compilerOptions,
isCustomElement: tag => tag.startsWith("ion-")
}
return options
})
config
.plugin("copy-webpack-plugin")
.use(CopyPlugin)
.tap(() => {
return [{
patterns: [
{
from: "./node_modules/upscalejs/dist/js/ort-*.wasm",
to: "js/[name][ext]",
},
{
from: "./node_modules/upscalejs/dist/models/*.onnx",
to: "models/[name][ext]",
}
],
}]
})
config.optimization.minimizer("terser").tap((args) => {
args[0].terserOptions.output = {
...args[0].terserOptions.output,
comments: false
}
args[0].terserOptions.compress.drop_console = true
return args
})
},
transpileDependencies: ["color"],
publicPath: process.env.NODE_ENV === "production"
? "/3x3-generator/"
: "/"
}