-
-
Notifications
You must be signed in to change notification settings - Fork 8
You are running a development build of vue-i18n #74
Comments
Thank you for your reporting! |
Hi,@scambier, Do you mean you want to run in export default defineConfig({
mode: 'production',
plugins: [
vue(),
vueI18n({
include: path.resolve(__dirname, './src/locales/**')
})
]
}) See also this vite document. |
maybe, related issue intlify/vue-i18n#391 |
Indeed, setting the @kazupon here's what I understand for Vite's When you call This is explained here:
Also, setting The value modules should look for to differentiate between production and development is I'll make a reproduction repo asap if it's still needed, thank you for your time |
@scambier I found that there is a bug in the feature flags setting. |
This issue is |
I've just fixed it! |
@kazupon To reproduce, simple build your app with Like I said in this post, my comprehension is that the build mode name should be irrelevant, and the only value that should determine if a build is for production or not should be |
@scambier We are going to release vue-i18n v9.1 soon. |
I released vue-i18n v9.1 ! You can try it! :) |
@kazupon There's still a warning.
My locale files are .json. vite.config.js:
|
Hmm, it's strange … 🤔 I checked at vue-i18n starter for vite. |
@kazupon I'm not sure if this helps but I also have this issue on a standard Vue project. All I did in my project that was scaffolded by using @vue/cli
After the installation run
Locales folder doesn't work and I get that in my console. |
In vue.config.js the localeDir is set to
The esm-bundler warning persists. |
Module versions (please complete the following information):
vue
: ^3.0.4vue-i18n
: ^9.0.0Hello, I can't get rid of the following warnings after building my app:
You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.
You are running a development build of vue-i18n. Make sure to use the production build (*.prod.js) when deploying for production.
I'm using Vue 3 with Vite 2, and my locale files are in yaml (there is no .
NODE_ENV
is set toproduction
. I heavily use$t()
in single-page components, have some calls touseI18n()
, but don't use the<i18n>
block at all.I tried using
@intlify/vite-plugin-vue-i18n
in myvite.config.ts
, but without success.It's quite certainly a comprehension problem on my part
The text was updated successfully, but these errors were encountered: