Skip to content

Commit

Permalink
feat(build): add config for vue 2 compatibility with vue 3
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanchal committed Jul 14, 2022
1 parent aab47c6 commit e37874d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ module.exports = {
const vueRule = config.module.rule('vue');
const jsRule = config.module.rule('js');

// for vue2 -> vue3 migration
config.resolve.alias.set('vue', '@vue/compat');
config.module
.rule('vue')
.use('vue-loader')
.tap((options) => {
return {
...options,
compilerOptions: {
compatConfig: {
MODE: 2,
},
},
};
});

const useBasicTPool = (rule, loader) => {
rule.uses.clear();
rule
Expand Down

0 comments on commit e37874d

Please sign in to comment.