Closed fedorenkodev closed 4 years ago
Hi @fedorenkodev !
Thanks for your question! Did you checkout the API here: https://devowlio.gitbook.io/wp-react-starter/advanced/extend-compose-webpack#webpack ?
If you want to add another plugin, you can do something like this:
import { createDefaultSettings } from "../../../common/webpack.factory";
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
export default createDefaultSettings("plugin", {
override: ([config]) => {
config.plugins.push(
new BundleAnalyzerPlugin()
);
}
});
Regards, Matthew 😎
Looks good to me, just wanted to clarify if its the correct way to use the push method. Thanks!
Hey guys, Could anybody please provide an example of extending the webpack config? Especially how to add the new plugin. Thanks.