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.

How to use vue-i18n-loader with vue-loader 15?

See original GitHub issue

With vue-loader 14, my Webpack 4 config has the following block:

{
  test: /\.vue$/,
  loader: 'vue-loader',
  options: {
    loaders: {
      i18n: '@kazupon/vue-i18n-loader'
    }
  }
},

After upgrading to the release candidate of vue-loader 15, none of my translations work, vue-i18n doesn’t load any translation from <i18n> blocks within the .vue files.

Is this a known limitation or do I have to change anything in the Webpack 4 config? For vue-loader 15, I had to add new VueLoaderPlugin(), in the plugins section after adding const { VueLoaderPlugin } = require('vue-loader')

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17

github_iconTop GitHub Comments

4reactions
Lanfeicommented, Apr 25, 2018

You can add following rule in your webpack.conf.js:

{
  module: {
    rules: [
      {
        resourceQuery: /\bblockType=i18n\b/,
        loader: '@kazupon/vue-i18n-loader'
      }
      //, Other rules
    ]
  }
}
1reaction
smarescommented, Apr 27, 2018

Follow-up: It works if I rename the files to *.loca. Any idea how to make it work with *.json?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use vue-i18n-loader with vue-loader 15? #16 - GitHub
With vue-loader 14, my Webpack 4 config has the following block: { test: /\.vue$/, loader: 'vue-loader', options: { loaders: { i18n: ...
Read more >
Single file components | Vue I18n
You need to install vue-loader and vue-i18n-loader to use <i18n> custom blocks. ... for Laravel-mix 4 with vue-loader v15 or later:.
Read more >
Vue-i18n loader webpack config with Laravel Mix
We have a project setup with Laravel and Mix, Vue (2.7) and Vue-i18n which was working up to now. We recently had to...
Read more >
Webpack Loader for Vue I18n - Morioh
usemodal-vue3. An easy-to-use Modal for Vue 3. · Install. npm i usemodal-vue3 · CDN. https://www.unpkg.com/usemodal-vue3 · Usage. import { ref } from 'vue';...
Read more >
@kazupon/vue-i18n-loader | Yarn - Package Manager
WARNING: If you would like to use @kazupon/vue-i18n-loader that is released new features and bug fixes, you need to install @intlify/vue-i18n-loader.
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