-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Describe the bug
I'm using fluent-vue via the official unplugin-fluent-vue/nuxt module in a Nuxt 4 project. The blocks defined inside single-file Vue components work correctly in development and production.
However, when running unit tests (using @nuxt/test-utils and Vitest), the translations are not rendered. Instead of translated strings, the raw keys appear in the DOM.
What I tried:
- Configured the plugin via unplugin-fluent-vue/nuxt
- Ensured fluentVue.sfc is set in nuxt.config.ts
- Manually added SFCFluentPlugin({ blockType: 'fluent' }) to vite.plugins (makes no difference)
- Cleared .nuxt, node_modules, cache, etc.
- Confirmed the plugin executes in development and console logs show it's active (can be checked in the reproduction below)
Reproduction
https://stackblitz.com/edit/nuxt-starter-wuys3u6q?view=editor
System Info
System:
OS: Linux 6.15 Arch Linux
CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor
Memory: 7.58 GB / 31.00 GB
Container: Yes
Shell: 4.0.2 - /usr/bin/fish
Binaries:
Node: 22.17.1 - ~/.local/share/asdf/installs/nodejs/22.17.1/bin/node
npm: 10.9.2 - ~/.local/share/asdf/plugins/nodejs/shims/npm
pnpm: 10.12.4 - ~/.local/share/npm/bin/pnpm
npmPackages:
fluent-vue: ^3.7.2 => 3.7.2
unplugin-fluent-vue: ^1.4.1 => 1.4.1
Validations
- Read the Contributing Guidelines.
- 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.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels