-
Notifications
You must be signed in to change notification settings - Fork 26
/
vue.config.js
46 lines (45 loc) · 998 Bytes
/
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
// Read config files that may not exist.
const webpack = require('webpack');
module.exports = {
// base url
publicPath: '/',
// output dir
outputDir: './www',
// eslint-loader check
lintOnSave: true,
// webpack-dev-server
devServer: {
host: '0.0.0.0',
port: 8080
},
css: {
// modules: true,
loaderOptions: {
sass: {
prependData: '@import "~@/styles/variables.scss";'
}
}
},
configureWebpack: {
resolve: {
fallback: {
https: require.resolve('https-browserify'),
http: require.resolve('stream-http'),
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
zlib: require.resolve('browserify-zlib'),
querystring: require.resolve('querystring-es3'),
path: require.resolve('path-browserify'),
vm: require.resolve('vm-browserify'),
fs: false,
vm: false,
}
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
})
]
}
};