Comments (5)
I made a Repository with the bare minimum. You can check it out here [email protected]:pfinkbeiner/nuxt3-vite-i18n-example.git
Try to clone it and see if it works on your machine. If so, compare the versions and configurations.
from bundle-tools.
Hm might be the wrong import.
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
instead of
import VueI18nPlugin from '@intlify/unplugin-vue-i18n'
Then you will most likely run into an issue with Internal server error: All collection items must start at the same column
If so remove the plugin from additional vite config. Thats how I got it up and running.
// nuxt.config.ts
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'@nuxtjs/i18n',
],
})
from bundle-tools.
I get the same error in both import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
and import VueI18nPlugin from '@intlify/unplugin-vue-i18n'
. I think to need plugins key. I don't get an error the no plugins key, but the translation doesn't work.
// nuxt.config.ts
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
export default defineNuxtConfig({
devtools: { enabled: true },
vite: {
plugins: [
VueI18nPlugin(),
],
},
modules: [
'@nuxtjs/i18n',
],
})
and
// nuxt.config.ts
import VueI18nPlugin from '@intlify/unplugin-vue-i18n'
export default defineNuxtConfig({
devtools: { enabled: true },
vite: {
plugins: [
VueI18nPlugin.vite(),
],
},
modules: [
'@nuxtjs/i18n',
],
})
from bundle-tools.
@pfinkbeiner I fixed it I use useI18n().t
instead of $t
and it solved the problem. Thank you.
from bundle-tools.
Related Issues (20)
- [Vue 2.7][vite] Custom blocks don't work in components that are written with Options API HOT 5
- YAML import not parsing Anchor HOT 1
- Module is a CommonJS module, which may not support all module.exports as named exports. HOT 8
- Webpack + vue.config.js failed to compile HOT 11
- Using i18n-t component + @intlify/unplugin-vue-i18n/vite causes error in build HOT 1
- Support TS format for messages
- unplugin-vue-i18n: regression with v0.9.1 - unexpected token: '{' HOT 10
- Unexpected token error after 0.9.0 @intlify/unplugin-vue-i18n HOT 3
- Error code : 2 after update to 0.10.0 @intlify/unplugin-vue-i18n HOT 3
- Types exports in package.json are wrong
- Switch escodegen to something else. It's dependency "word-wrap" is reported as having a security issue HOT 3
- ERROR [unplugin-vue-i18n] Detected HTML in (nuxt3, vite, vueI18n) HOT 17
- [Suggestion] In the usage section fix default locale path example HOT 2
- 'vue-i18n' or 'petite-vue-i18n' to be present in the dependency tree. HOT 1
- TS files are not loaded (`@intlify/unplugin-vue-i18n/messages`) HOT 8
- [vue-facing-decorator][vue-3][vue-i18n@9] bug to load local i18n bloc HOT 2
- 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
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.