Skip to content

Loaders work only inline #3728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
manuelmazzuola opened this issue Mar 29, 2019 · 1 comment
Closed

Loaders work only inline #3728

manuelmazzuola opened this issue Mar 29, 2019 · 1 comment

Comments

@manuelmazzuola
Copy link

manuelmazzuola commented Mar 29, 2019

I've some issues configuring vue.config.js and webpack-chain.

This line const itPo = require('../../i18n/locales/it.po'); says You may need an appropriate loader to handle this file type. just in the browser console, not when webpack is compiling (if I remove the following configuration the webpack compile fails with the same error).

# vue.config.js
chainWebpack: (config) => {
    config.module
      .rule('po')
      .test(/\.po$/)
      .use('json')
      .loader('json-loader')
      .end()
      .use('po')
      .loader('po-loader?format=mf')
      .end();
  },

but it works if i write const itPo = require('json-loader!po-loader?format=mf!../../i18n/locales/it.po');.

Also this one doesn't work:

configureWebpack: {
    module: {
      rules: [
        {
          test: /\.po$/,
          loader: 'json-loader!po-loader?format=mf',
        },
      ],
    },

What I did wrong?

@vue-bot
Copy link

vue-bot commented Mar 29, 2019

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants