We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide example of Vite + Vue2 solution, there is no way how to make this work :-/
Small example with vite.config.js, tsconfig.base.json and 2 types of messages:
No response
The text was updated successfully, but these errors were encountered:
Simply switch Webpack's module.hot() to Vite's import.meta.hot(). I wish they should provide it in the docs too. Here is a simple snippet for you :)
import Vue from 'vue' import VueI18n from 'vue-i18n' import en from "@/locales/en.json"; import zhHans from "@/locales/zhHans.json"; import zhHant from "@/locales/zhHant.json"; Vue.use(VueI18n); const messages = { en, zhHans, zhHant } const i18n = new VueI18n({ locale: 'en', messages }) // Hot updates if (import.meta.hot) { import.meta.hot.on("locales-update", (data) => { i18n.setLocaleMessage('en', en.default) i18n.setLocaleMessage('zhHans', zhHans.default) i18n.setLocaleMessage('zhHant', zhHant.default) }) } export default i18n;
Sorry, something went wrong.
how to use Lazy loading translations in vite + vue2 . 8.x not provide an example
No branches or pull requests
Clear and concise description of the problem
Please provide example of Vite + Vue2 solution, there is no way how to make this work :-/
Suggested solution
Small example with vite.config.js, tsconfig.base.json and 2 types of messages:
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: