From a370d8c492390456a4ebb7173e6e04753b615795 Mon Sep 17 00:00:00 2001 From: Deep Panchal Date: Thu, 14 Jul 2022 16:09:41 -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 d89837ce5..7957cd1ad 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