Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Commit af66370

Browse files
authored
fix: cannot work legacy mode, when install plugin (#185)
1 parent 89046f3 commit af66370

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = (api, options) => {
77
enableInSFC,
88
localeDir,
99
runtimeOnly,
10+
enableLegacy,
1011
compositionOnly,
1112
fullInstall
1213
} = options.pluginOptions.i18n
@@ -48,7 +49,11 @@ module.exports = (api, options) => {
4849
debug('set vue-i18n runtime only')
4950
}
5051

51-
const legacyApiFlag = compositionOnly ? 'false' : 'true'
52+
// prettier-ignore
53+
const legacyApiFlag = enableLegacy
54+
? 'true'
55+
: compositionOnly
56+
? 'false' : 'true'
5257
const installFlag = fullInstall ? 'true' : 'false'
5358
webpackConfig.plugin('vue-i18n-feature-flags').use(webpack.DefinePlugin, [
5459
{

0 commit comments

Comments
 (0)