Skip to content
This repository was archived by the owner on Jul 4, 2021. It is now read-only.

Commit 86d13a2

Browse files
authored
fix: esm-bundler warning (#75)
closes #73 closes #74
1 parent 63643ba commit 86d13a2

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/index.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,18 @@ function pluginI18n(
7373
debug('set vue-i18n runtime only')
7474
}
7575

76-
if (compositionOnly) {
77-
config.define = config.define || {}
78-
config.define['__VUE_I18N_LEGACY_API__'] = false
79-
debug('set __VUE_I18N_LEGACY_API__ is `false`')
80-
}
76+
config.define = config.define || {}
77+
config.define['__VUE_I18N_LEGACY_API__'] = !compositionOnly
78+
debug(
79+
`set __VUE_I18N_LEGACY_API__ is '${config.define['__VUE_I18N_LEGACY_API__']}'`
80+
)
8181

82-
if (!fullIinstall) {
83-
config.define = config.define || {}
84-
config.define['__VUE_I18N_FULL_INSTALL__'] = false
85-
debug('set __VUE_I18N_FULL_INSTALL__ is `false`')
86-
}
82+
config.define['__VUE_I18N_FULL_INSTALL__'] = fullIinstall
83+
debug(
84+
`set __VUE_I18N_FULL_INSTALL__ is '${config.define['__VUE_I18N_FULL_INSTALL__']}'`
85+
)
86+
87+
config.define['__INTLIFY_PROD_DEVTOOLS__'] = false
8788
},
8889

8990
configResolved(_config: ResolvedConfig) {

0 commit comments

Comments
 (0)