My webpack config files are generated by vue-cli..
I need to apply the following modification which was written for webpack 1 I guess , to add the resolve-url-loader. (see resolve-url-loader
Apply via webpack config
It is preferable to adjust your webpack.config so to avoid having to prefix every require() statement:
module.exports = {
module: {
loaders: [
{
test : /\.css$/,
loaders: ['style-loader', 'css-loader', 'resolve-url-loader']
}, {
test : /\.scss$/,
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'sass-loader?sourceMap']
}
]
}
};
How can I edit my webpack 2 config ? which is composed of ( files !
utils.js
vue-loader.conf.js
webpack.base.conf.js
webpack.dev.conf.js
webpack.prod.conf.js
thanks for feedback and useful links to read ...
I am using vue-cli-3 and it took quite some time to find out how to solve this issue. I had to put this into my
vue.config.js
:This adds the
url-resolve-loader
for all thesass
/scss
code.