Created
April 6, 2021 13:39
-
-
Save gdhardy1/7103aa1b9feda994e52348d10c700a84 to your computer and use it in GitHub Desktop.
Silence mini-css-extract-plugin warning about css order conflict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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