Comments (5)
Is there any version of vite-plugin-vue-i18n that works with Vue 2?
Unfortunately, vite-plugin-vue-i18n
is not supported for Vue 2. π
currently, you can migrate to Vue 3 ([email protected]) from Vue 2 ([email protected]) with vue-i18n-composable + Composition API, or @vue/compat
migration step for vue-i18n-composable + Composition API
- [email protected] + Vue 2
- [email protected] +
@vue/composition-api
+vue-composable
+ Vue 2 (migrate to Composition API from options API) - [email protected] + Vue 3 (if you use
vite
, you can usevite-plugin-vue-i18n
)
migration step for Options API
- [email protected] + Vue 2
- [email protected] (legacy mode) +
@vue/compat
- [email protected] (legacy mode or Composition API mode) + Vue 3 (if you use
vite
, you can usevite-plugin-vue-i18n
)
from bundle-tools.
Thank you for your reporting!
Unfortunately, I could not reproduce the same issue in my environment.
So, In order for us to find the cause, we need a repo to reproduce.
Could you give us a minimal reproduction environment, please?
npmPackages:
@intlify/vite-plugin-vue-i18n: ^2.4.0 => 2.4.0
@intlify/vue-i18n-loader: ^1.0.0 => 1.0.0
vite: ^2.4.4 => 2.4.4
vue: ^2.6.12 => 2.6.12
vue-i18n: ^9.1.7 => 9.1.7
I've found out some stuff from your npm packages that are installed in your environment.
[email protected] support for Vue 3 only.
I seem Vue 2.x is installed in your environment.
and, @intlify/vue-i18n-loader
too.
I'm curious what your environment looks like.
It looks like you have a mix of environments built with Vue CLI and vite.
Once you have Vue 3, [email protected], vite and @intlify/vite-plugin-vue-i18n
, so itβs installed with npm init vite@latest
.
Could you please check if the same issue occurs in your environment?
from bundle-tools.
Yes was trying to migrate to vite from webpack and later discovered v9 isn't compatible with Vue2. No worries, I assume it might be due to the version mismatch. Someone can reopen if they encounter it too.
from bundle-tools.
@kazupon Is there any version of vite-plugin-vue-i18n
that works with Vue 2?
I've got everything working except for i18n as messages are not loading from blocks like they were in Webpack. I instead get missing key errors.
(I've downgraded to vue-i18n 8.25.0 already)
from bundle-tools.
Thanks @kazupon for clarifying, no problem. I can't upgrade yet to Vue 3 due to other third-party dependencies. But I just moved all my <i18n>
blocks into the JS section as an object instead which worked fine.
from bundle-tools.
Related Issues (20)
- Indirect dependency semver vulnerable to Regular Expression Denial of Service
- failed to load config vite.config.js HOT 1
- TS error unplugin-vue-i18n 0.12.3 in createI18n HOT 2
- Cannot read properties of undefined (reading 'length') HOT 3
- Improper parsing of linked messages with `-` after 0.12 HOT 2
- @intlify/unplugin-vue-i18n doesn't work with Nuxt 3.7 HOT 1
- Missing dependencies and missing MessageFunctionInternal definition HOT 1
- can not inclue js locale files HOT 2
- Changelog of unplugin-vue-i18n is not up to date HOT 3
- @intlify/unplugin-vue-i18n not support HMR with Static bundle importing HOT 1
- Dependency Dashboard
- Module parse failed: Unexpected token (1:0) when combined with html-webpack-plugin HOT 14
- Failed locale loading: Unexpected token 'const'. HOT 1
- Rollup 4 support HOT 1
- `onlyLocales` not working for SFC <i18n locale="xx">
- it is not installed using npm install HOT 1
- Webpack build does not work together with html-webpack-plugin HOT 2
- Using HTML in SFC results in parsing issue `Unexpected scalar at node end` HOT 1
- nuxt3ε½ι εζ₯ι HOT 1
- Missing compile function in SSR build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundle-tools.