-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
36 lines (32 loc) · 1012 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
const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack');
const chainWebpack = (webpackConfig) => {
// comment out everything in here to get a vue3 only version
// plain vue3 without compat mode
if (process.env.USE_COMPAT) {
webpackConfig.resolve.alias.set('vue', '@vue/compat');
webpackConfig.module
.rule('vue')
.use('vue-loader')
.tap((options) => ({
...options,
compilerOptions: {
compatConfig: {
MODE: 3,
},
},
}));
}
};
module.exports = defineConfig({
chainWebpack,
configureWebpack: {
plugins: [
new webpack.DefinePlugin({
// Vue CLI is in maintenance mode, and probably won't merge my PR to fix this in their tooling
// https://github.com/vuejs/vue-cli/pull/7443
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false',
})
],
},
});