Skip to content

Instantly share code, notes, and snippets.

@gdhardy1
Created April 6, 2021 13:39
Show Gist options
  • Save gdhardy1/7103aa1b9feda994e52348d10c700a84 to your computer and use it in GitHub Desktop.
Save gdhardy1/7103aa1b9feda994e52348d10c700a84 to your computer and use it in GitHub Desktop.
Silence mini-css-extract-plugin warning about css order conflict
// gatsby-node.js
exports.onCreateWebpackConfig = ({ stage, actions, getConfig, rules }) => {
const config = getConfig();
const miniCssExtractPlugin = config.plugins.find(
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin'
);
if (miniCssExtractPlugin) {
miniCssExtractPlugin.options.ignoreOrder = true;
}
actions.replaceWebpackConfig(config);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment