question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interpolations in production mode does not work

See original GitHub issue

What happened?

see issue: intlify/vue-i18n-next#1059

What did you expect to happen?

see issue: intlify/vue-i18n-next#1059

Reproduction URL

none

How to reproduce?

see issue: intlify/vue-i18n-next#1059

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

No response

Quasar info output

No response

Relevant log output

No response

Additional context

Solution:

      vitePlugins: [
        [
          "@intlify/vite-plugin-vue-i18n",
          {
            // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
            // compositionOnly: false,

            runtimeOnly: ctx.dev,
            // you need to set i18n resource including paths !
            include: path.resolve(__dirname, "./src/i18n/**"),
          },
        ],
      ],

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
kovacevjosipcommented, Oct 20, 2022

If you are using vite setup, interpolation does not work correctly on production mode. If you have defined plural values (example: note: Note | Notes) it will actually show both values when project is built. Webpack setup works correctly.

Add runtimeOnly: ctx.dev to quasar.config.js to fix vite setup issue,

Current versions:

  • @quasar/cli: v1.3.2
  • @quasar/app-vite: v1.1.3
  • @quasar/app-webpack: v3.6.2
0reactions
tofi86commented, Jul 25, 2022

We had the same issue and I can confirm that @gewisser’s solution with runtimeOnly: ctx.dev works. This should be part of the quasar template IMHO.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue-i18n@9.2.2 argument interpolation works in dev, not ...
This is the issue I am having: as an example, I would like to have this message displayed with i18n. Hello World. And...
Read more >
Security - Angular
This topic describes Angular's built-in protections against common web-application vulnerabilities and attacks such as cross-site scripting attacks.
Read more >
List of interpolated songs - Wikipedia
Interpolated artist Interpolated song Interpolating song 50 Cent "Many Men (Wish Death)" "Got It on Me" Aerosmith "Dream On" "Sing for the Moment" Andrea Bocelli "Con...
Read more >
Interpolated data in PI Connector for OPC UA
We are using PI Connector for OPC UA 1.3.0.130 in Tags-Only mode in the Production System. ... However this behavior is causing problem...
Read more >
it seems you are interpolating a keyframe declaration
Error: It seems you are interpolating a keyframe declaration (hVshE) into an untagged string. This was supported in styled-components v3, but is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found