intlify / vue-i18n-loader

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

Support JSON and YAML Files at the same time #131

Closed ricardo17coelho closed 3 years ago

ricardo17coelho commented 4 years ago

I don't know if it's possible, but it would be good if it were possible.

I already tried as mentioned in the docs something like this:

// Vue CLI 3.0
module.exports = {
  chainWebpack: config => {
    config.module
      .rule("i18n")
      .resourceQuery(/blockType=i18n/)
      .type('javascript/auto')
      .use("i18n")
        .loader("@kazupon/vue-i18n-loader")
        .end()
      .use('yaml')
        .loader('yaml-loader')
        .end()
  }
}

but doesn't work.

kazupon commented 3 years ago

Unfortunately, concurrent use is not supported. However, vue-i18n-loader is parsed internally using the yaml parser. So you shouldn't need to use the yaml-loader.