-
Notifications
You must be signed in to change notification settings - Fork 5
/
vue.config.js
55 lines (54 loc) · 1.5 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
const { defineConfig } = require('@vue/cli-service');
const webpack = require('webpack');
const { version } = require('./package.json');
module.exports = defineConfig({
configureWebpack: {
resolve: {
fallback: {
stream: false,
process: require.resolve('process/browser'),
buffer: require.resolve('buffer/'),
events: require.resolve('events'),
querystring: require.resolve('querystring-es3'),
}
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
process: 'process/browser',
}),
new webpack.DefinePlugin({
'process.env.PACKAGE_VERSION': JSON.stringify(version),
})
],
devServer: {
client: {
overlay: false,
},
},
},
css: {
loaderOptions: {
sass: {
additionalData: `
@import "src/assets/styles/variables.scss";
`
}
}
},
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => ({
...options,
compilerOptions: {
isCustomElement: (tag) => tag === 'ion-icon'
}
}));
},
transpileDependencies: [
'vue-meta',
],
productionSourceMap: false,
});