-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathvue.config.js
56 lines (54 loc) · 1.52 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
const fs = require('fs')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
publicPath: '.',
productionSourceMap: false,
css: {
modules: true,
},
/**
* If the value is an Object, it will be merged into the final config using webpack-merge.
* If the value is a function, it will receive the resolved config as the argument.
* The function can either mutate the config and return nothing,
* OR return a cloned or merged version of the config.
*/
configureWebpack: {
plugins: [
new CopyWebpackPlugin([
{
from: './public/web3Ready-demo.html',
to: 'index.html',
},
{
from: './public/web3Ready-demo.css',
to: 'web3Ready-demo.css',
}
]),
],
},
chainWebpack: (config) => {
// Change default SVG loader.
const svgRule = config.module.rule('svg')
// clear all existing loaders.
// if you don't do this, the loader below will be appended to
// existing loaders of the rule.
svgRule.uses.clear()
// add replacement loader(s)
svgRule
.test(/\.(svg)(\?.*)?$/)
.use('svg-url-loader')
.loader('svg-url-loader')
.end()
},
devServer: {
open: process.platform === 'darwin',
host: 'localhost', // You may set 0.0.0.0, but it will brake ssl setup.
port: 8080,
hotOnly: false,
https: {
key: fs.readFileSync('./ssl/server.key'),
cert: fs.readFileSync('./ssl/server.crt'),
ca: fs.readFileSync('./ssl/rootCA.pem'),
},
},
}