forked from liquality/wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
75 lines (69 loc) · 1.68 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
module.exports = {
lintOnSave: false,
productionSourceMap: false,
css: {
loaderOptions: {
sass: {
prependData: '@import "@/assets/scss/_vars.scss";'
}
}
},
chainWebpack: (config) => {
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
svgRule
.oneOf('inline')
.resourceQuery(/inline/)
.use('svg-url-loader')
.loader('svg-url-loader')
.end()
.end()
.oneOf('external')
.use('babel-loader')
.loader('babel-loader')
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader')
.options({
svgo: {
plugins: [{ removeViewBox: false }, { removeDimensions: true }]
}
})
},
pluginOptions: {
browserExtension: {
componentOptions: {
background: {
entry: 'src/background.js'
},
contentScripts: {
entries: {
'content-script': [
'src/contentScript.js'
]
}
}
},
manifestTransformer: manifest => {
manifest.content_security_policy = "script-src 'self' 'unsafe-eval' 'unsafe-inline' https://cdn.segment.com 'sha256-ZgDy59Dh4jH9g/vcPYFpoQ1wumB4IdPEOS1BJc08i+Y='; object-src 'self';"
manifest.externally_connectable = {
matches: [`${process.env.VUE_APP_LEDGER_BRIDGE_URL}/`]
}
return manifest
}
}
},
pages: {
popup: {
template: 'public/index.html',
entry: './src/main.js',
title: 'Liquality Wallet'
},
standalone: {
template: 'public/index.html',
entry: './src/main.js',
title: 'Liquality Wallet',
filename: 'index.html'
}
}
}