intlify / vue-cli-plugin-i18n

:globe_with_meridians: Vue CLI plugin to add vue-i18n to your Vue Project
MIT License
195 stars 41 forks source link

__VUE_I18N_FULL_INSTALL__ flag never be true #195

Closed tomocrafter closed 3 years ago

tomocrafter commented 3 years ago

Reporting a bug? If I enabled fullInstall in vue.config.js, then put the console.log(__VUE_I18N_FULL_INSTALL__) in vue-i18n.esm-bundler.js, it will prints false in console.

Module versions (please complete the following information):

To Reproduce Steps to reproduce the behavior: ex:

  1. Set fullInstall: true in vue.config.js
  2. Use v-t directive with component.
  3. Check console that says t directive is not defined although full installation is enabled in the config.

Expected behavior __VUE_I18N_FULL_INSTALL__ is set to true in vue-i18n bundler

kazupon commented 3 years ago

Thank you for your reporting! Unfortunately, I could not reproduce this issue.

I hope you would like to run the vue inspect in your project. Then you will get the information in the webpack config:

...
...
/* config.plugin('vue-i18n-feature-flags') */
    new DefinePlugin(
      {
        __VUE_I18N_LEGACY_API__: 'true',
        __VUE_I18N_FULL_INSTALL__: 'true',
        __VUE_I18N_PROD_DEVTOOLS__: 'false'
      }
    )
...
...

Could you provide your inspection info, please?

tomocrafter commented 3 years ago

Thank you for quick response! It says correctly:

/* config.plugin('vue-i18n-feature-flags') */
new DefinePlugin(
  {
    __VUE_I18N_LEGACY_API__: 'false',
    __VUE_I18N_FULL_INSTALL__: 'true',
    __VUE_I18N_PROD_DEVTOOLS__: 'false'
  }
),

but seems like it is not replaced on client side at compile? Anyway, this issue is seems not related to this plugin, therefore I close this issue.