Closed
Description
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?
Metadata
Metadata
Assignees
Labels
No labels