Open Bert0324 opened 4 years ago
Drop this within override()
:
config => {
config.plugins = config.plugins.filter(plugin => plugin.constructor.name !== "MiniCssExtractPlugin");
return config;
},
Drop this within
override()
:config => { config.plugins = config.plugins.filter(plugin => plugin.constructor.name !== "MiniCssExtractPlugin"); return config; },
i got this error when i build with plugin.constructor.name !== 'MiniCssExtractPlugin'
Filtering out the plugin no longer works. I don't know a way around it
you can replace the mini-css-extract-plugin with style-loader.
const {override, adjustStyleLoaders} = require('customize-cra');
override(
adjustStyleLoaders(({use}) => {
const styleLoader = use[0].loader.replace('mini-css-extract-plugin/dist/loader.js', 'style-loader/index.js');
use[0] = styleLoader;
})
);
As the title says, I want to disable MiniCssExtractPlugin in CRA, coz I want my final bundle without CSS file, all styles are included in JS.
Is there a possible way to do it by changing configuration?
Many Thanks Dudes.