craco
craco copied to clipboard
Cannot override the existed plugin config in CRA5
how to override the existing plugin config such as HtmlWebpackPlugin? For example, if I want to amend the name of index.html to others in /build folder.
@Rickyoung221 you should be able to do that like normal, as outlined here in the html-webpack-plugin docs.
/* craco.config.js */
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
webpack: {
plugins: {
add: [
new HtmlWebpackPlugin({
/* configuration here */
}),
],
},
},
};
For me, knowing and having already used the html-webpack-plugin, this does not work.
Please read the logs in the issue I posted which is more precise.
Thanks.