From 4c0a1f286cff9938b5bd11f78f257c8653167c45 Mon Sep 17 00:00:00 2001 From: Deep Panchal Date: Thu, 14 Jul 2022 15:17:47 -0500 Subject: [PATCH] feat(build): add config for vue 2 compatibility with vue 3 --- vue.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vue.config.js b/vue.config.js index d89837ce56..7957cd1adf 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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