Hi ! I'm trying to migrate from extract-text-webpack-plugin and I can't figure out if there is an option similar to url: false in mini-css-extract-plugin ?
Or any other way to ignore image urls in CSS files. (But not in JS files).
Many thanks in advance for any help or answer you can provide. 馃槂
Don't use this plugin for css, it is abandoned and deprecated
Sorry for my english, I'm trying to migrate FROM extract-text-webpack-plugin TO mini-css-extract-plugin.
I'm looking for a way not to process image files, in extract-text-webpack-plugin I was using {options: {url: false}}, is there a similar option in mini-css-extract-plugin ? Or any other solution to achieve this ?
@martinlemahieu it is option for css-loader, not for this plugin
@evilebottnawi it is ! 馃ぃ Sorry it seems I'm too tired, thank you for pointing it out, I could have spend some time figuring it out myself !
hi @martinlemahieu , I'm having the same issue. so can you please mention your solution?
update: found it
[
devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: { url: false }
}
]
Another example:
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// ...
module.exports = {
// ...
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
url: false
}
},
'resolve-url-loader',
'sass-loader'
]
},
// ...
]
}
};
Most helpful comment
hi @martinlemahieu , I'm having the same issue. so can you please mention your solution?
update: found it