You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Vue 3, Vue I18n v9, and vue-i18n-loader v4.1.0, I'm not able to build a particular component that uses an i18n custom block. Looking at the messages in the block, I think I have tracked down the issue to a specific case: an array where one element of the array is itself an array, but the next element is not an array. For example, when I try to build a component with the following i18n custom block, I see an error message:
Module parse failed: Unexpected token (10:17)
File was processed with these loaders:
* ./node_modules/@intlify/vue-i18n-loader/lib/index.js
* ./node_modules/cache-loader/dist/cjs.js
* ./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js
You may need an additional loader to handle the result of these loaders.
| [
| (ctx) => {const { normalize: _normalize } = ctx;return _normalize(["bar"])}
> ](ctx) => {const { normalize: _normalize } = ctx;return _normalize(["baz"])},
|
| ]
Looking at ](ctx), it looks like a comma is missing between ] and (ctx).
Expected behavior
I am migrating a project from Vue 2 to Vue 3, and I was previously able to build this component. It would be great not to have to change the structure of the messages, because the translation platform we use would register that as completely new translations.
Reproduction
Please let me know if any information would be helpful in addition to the i18n custom block above.
Reporting a bug?
Using Vue 3, Vue I18n v9, and vue-i18n-loader v4.1.0, I'm not able to build a particular component that uses an i18n custom block. Looking at the messages in the block, I think I have tracked down the issue to a specific case: an array where one element of the array is itself an array, but the next element is not an array. For example, when I try to build a component with the following i18n custom block, I see an error message:
However, I am able to build a component with the following i18n custom block:
The error message I see is:
Looking at
](ctx)
, it looks like a comma is missing between]
and(ctx)
.Expected behavior
I am migrating a project from Vue 2 to Vue 3, and I was previously able to build this component. It would be great not to have to change the structure of the messages, because the translation platform we use would register that as completely new translations.
Reproduction
Please let me know if any information would be helpful in addition to the i18n custom block above.
Issue Package
vue-i18n-loader
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: