From af663700e7c583e6875d1aeb026ad976fea824f1 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Mon, 29 Mar 2021 12:37:37 +0900 Subject: [PATCH] fix: cannot work legacy mode, when install plugin (#185) --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e5eb5db..279473b 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,7 @@ module.exports = (api, options) => { enableInSFC, localeDir, runtimeOnly, + enableLegacy, compositionOnly, fullInstall } = options.pluginOptions.i18n @@ -48,7 +49,11 @@ module.exports = (api, options) => { debug('set vue-i18n runtime only') } - const legacyApiFlag = compositionOnly ? 'false' : 'true' + // prettier-ignore + const legacyApiFlag = enableLegacy + ? 'true' + : compositionOnly + ? 'false' : 'true' const installFlag = fullInstall ? 'true' : 'false' webpackConfig.plugin('vue-i18n-feature-flags').use(webpack.DefinePlugin, [ {