@@ -9,6 +9,7 @@ const path = require("path");
99const slugify = require ( "./src/utils/slugify" ) ;
1010const { paginate } = require ( "gatsby-awesome-pagination" ) ;
1111const { createFilePath } = require ( "gatsby-source-filesystem" ) ;
12+ const FilterWarningsPlugin = require ( "webpack-filter-warnings-plugin" ) ;
1213const config = require ( "./gatsby-config" ) ;
1314const {
1415 componentsData,
@@ -977,7 +978,7 @@ const createSectionPage = ({ envCreatePage, node }) => {
977978 } ) ;
978979} ;
979980
980- exports . onCreateWebpackConfig = ( { actions } ) => {
981+ exports . onCreateWebpackConfig = ( { actions, stage , getConfig } ) => {
981982 actions . setWebpackConfig ( {
982983 resolve : {
983984 fallback : {
@@ -987,7 +988,29 @@ exports.onCreateWebpackConfig = ({ actions }) => {
987988 } ,
988989 } ,
989990 } ) ;
991+ actions . setWebpackConfig ( {
992+ plugins : [
993+ new FilterWarningsPlugin ( {
994+ exclude :
995+ / m i n i - c s s - e x t r a c t - p l u g i n [ ^ ] * C o n f l i c t i n g o r d e r . F o l l o w i n g m o d u l e h a s b e e n a d d e d : / ,
996+ } ) ,
997+ ] ,
998+ } ) ;
999+
1000+ if ( stage === "build-javascript" ) {
1001+ const config = getConfig ( ) ;
1002+ const miniCssExtractPlugin = config . plugins . find (
1003+ ( plugin ) => plugin . constructor . name === "MiniCssExtractPlugin"
1004+ ) ;
1005+
1006+ if ( miniCssExtractPlugin ) {
1007+ miniCssExtractPlugin . options . ignoreOrder = true ;
1008+ }
1009+
1010+ actions . replaceWebpackConfig ( config ) ;
1011+ }
9901012} ;
1013+
9911014exports . createSchemaCustomization = ( { actions } ) => {
9921015 const { createTypes } = actions ;
9931016 const typeDefs = `
0 commit comments