mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 08:13:49 +10:00
- fix conflicting order warning by mini-css-extract-plugin
This commit is contained in:
12
gatsby-node.js
Normal file
12
gatsby-node.js
Normal file
@ -0,0 +1,12 @@
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
|
||||
exports.onCreateWebpackConfig = ({ actions, stage, getConfig }) => {
|
||||
if (stage === "build-javascript") {
|
||||
const config = getConfig();
|
||||
const index = config.plugins.findIndex((plugin) => {
|
||||
return plugin.constructor.name === "MiniCssExtractPlugin";
|
||||
});
|
||||
config.plugins[index] = new MiniCssExtractPlugin({ ignoreOrder: true });
|
||||
actions.replaceWebpackConfig(config);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user