-
Notifications
You must be signed in to change notification settings - Fork 3
/
vue.config.js
39 lines (38 loc) · 1.01 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
const webpack = require('webpack');
module.exports = {
lintOnSave: true,
// productionTip: false,
chainWebpack: config => config.resolve.symlinks(false),
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new webpack.ProvidePlugin({
process: 'process/browser',
}),
],
resolve: {
extensions: ['*', '.mjs', '.js', '.ts', '.vue', '.json'],
fallback: {
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify/browser'),
url: require.resolve('url/'),
http: require.resolve('stream-http'),
stream: require.resolve('stream-browserify'),
crypto: require.resolve('crypto-browserify'),
assert: require.resolve('assert/'),
buffer: require.resolve('buffer'),
}
},
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto',
},
],
},
},
};