-
-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
status: review neededRequest for reviewRequest for review
Description
Reporting a bug?
Hey, I get the same error unexpected token 'export'. since a few hours in a blank new Nuxt 3 app and I can't figure it out. Maybe you will see what is wrong. :)
Also, the error differs when I add yaml but I still get an issue.
Expected behavior
The following component should display show more. Instead I get the error in the image below.
<template>
<div>{{ $t('showMore')}} </div>
</template>
<script lang="ts" setup>
</script>
<i18n lang="json">
{
"en": {
"showMore": "(Show more)"
},
"fr": {
"showMore": "(Afficher)"
}
}
</i18n>
Reproduction
I have created a blank new Nuxt 3 project with the following packages.
npm install @nuxtjs/i18n@next --save-dev
npm i @intlify/unplugin-vue-i18n
// nuxt.config.ts
import VueI18nPlugin from '@intlify/unplugin-vue-i18n'
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'@nuxtjs/i18n',
],
vite: {
plugins: [
VueI18nPlugin.vite({}),
],
}
})
Issue Package
vite-plugin-vue-i18n
System Info
System:
OS: macOS 13.0
CPU: (12) arm64 Apple M2 Pro
Memory: 189.55 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
Browsers:
Brave Browser: 114.1.52.126
Safari: 16.1Screenshot
Additional context
No response
Validations
- Read the Contributing Guidelines.
- Read the README
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
sawich
Metadata
Metadata
Assignees
Labels
status: review neededRequest for reviewRequest for review