-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
50 lines (41 loc) · 1.27 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
// const path = require('path')
// const webpack = require('webpack')
// const { getCssVar } = require('./script/cssVarHelper')
// const CopyWebpackPlugin = require('copy-webpack-plugin')
// console.log(webpack.Compiler.hooks)
// const publicPath = '/'
// const api = `${publicPath}api`
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
module.exports = {
lintOnSave: true,
// publicPath,
// template: 'examples/index.html',
// entry: 'examples/main.js',
// outputDir: 'lib',
// filenameHashing: false,
pages: {
index: {
entry: 'examples/main.js',
template: 'examples/index.html',
},
},
chainWebpack (config) {
// config.plugin('analyzer').use(BundleAnalyzerPlugin).end()
// config.entry('app').clear()
// .add('./test/main.js')
// .end()
const FILE_RE = /\.(vue|js|ts|svg)$/
config.module.rule('svg').issuer((file) => !FILE_RE.test(file))
config.module
.rule('svg-sprite')
.test(/\.svg$/)
.issuer((file) => FILE_RE.test(file))
.use('svg-sprite')
.loader('svg-sprite-loader')
// config.plugin('vendor').use(webpack.DllReferencePlugin, [{ manifest: require(path.resolve('manifest/vendor.json')) }])
},
devServer: {
port: 8080,
disableHostCheck: true,
},
}