intlify / vue-i18n-loader

:globe_with_meridians: vue-i18n loader for custom blocks
MIT License
268 stars 29 forks source link

A translation that has the '@' symbol in the JSON translation file an error will occur #206

Open KishSiva opened 2 years ago

KishSiva commented 2 years ago

Reporting a bug?

If there is a translation in a translation file (e.g. 'en.json') that contains the symbol @ the loader will return the error Module build failed: Error: Final loader (./node_modules/@intlify/vue-i18n-loader/lib/index.js) didn't return a Buffer or String. It seems like vue-i18n-loader does not realize it is text.

Expected behavior

I expect my translations to be displayed on the page, not to receive an error message.

Reproduction

I ran this using the runtime version of vue-i18n (vue-i18n/dist/vue-i18n.runtime.esm-bundler.js), @intlify/vue-i18n-loader and webpack.

System Info

I ran this using the runtime version of vue-i18n (vue-i18n/dist/vue-i18n.runtime.esm-bundler.js) and @intlify/vue-i18n-loader using webpack.

Screenshot

No response

Additional context

No response

Validations

Alex--C commented 1 year ago

Our workaround is: "foo{'@'}bar.com"

(see https://vue-i18n.intlify.dev/guide/essentials/syntax.html#literal-interpolation )