Skip to content

Commit

Permalink
Merge branch 'master' into open-source-program
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalvivekm authored Jan 5, 2025
2 parents d22800c + 6e2e6c2 commit b110642
Show file tree
Hide file tree
Showing 45 changed files with 1,209 additions and 490 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-preview-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
name: public-dir
path: ./public-dir.zip
retention-days: 1
- name: Triger Inner workflow
run: echo "trigering inner workflow"
- name: Trigger Inner workflow
run: echo "triggering inner workflow"
3 changes: 2 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
},
trailingSlash: "never",
plugins: [
"@mediacurrent/gatsby-plugin-silence-css-order-warning",
{
resolve: "gatsby-plugin-webpack-bundle-analyser-v2",
options: {
Expand Down Expand Up @@ -545,7 +546,7 @@ module.exports = {
resolve: "gatsby-plugin-robots-txt",
options: {
host: "https://layer5.io",
sitemap: "https://layer5.io/sitemap/sitemap-index.xml",
sitemap: "https://layer5.io/sitemap-index.xml",
policy: [{ userAgent: "*", allow: "/" }],
}
},
Expand Down
25 changes: 24 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const path = require("path");
const slugify = require("./src/utils/slugify");
const { paginate } = require("gatsby-awesome-pagination");
const { createFilePath } = require("gatsby-source-filesystem");
const FilterWarningsPlugin = require("webpack-filter-warnings-plugin");
const config = require("./gatsby-config");
const {
componentsData,
Expand Down Expand Up @@ -977,7 +978,7 @@ const createSectionPage = ({ envCreatePage, node }) => {
});
};

exports.onCreateWebpackConfig = ({ actions }) => {
exports.onCreateWebpackConfig = ({ actions, stage, getConfig }) => {
actions.setWebpackConfig({
resolve: {
fallback: {
Expand All @@ -987,7 +988,29 @@ exports.onCreateWebpackConfig = ({ actions }) => {
},
},
});
actions.setWebpackConfig({
plugins: [
new FilterWarningsPlugin({
exclude:
/mini-css-extract-plugin[^]*Conflicting order. Following module has been added:/,
}),
],
});

if (stage === "build-javascript") {
const config = getConfig();
const miniCssExtractPlugin = config.plugins.find(
(plugin) => plugin.constructor.name === "MiniCssExtractPlugin"
);

if (miniCssExtractPlugin) {
miniCssExtractPlugin.options.ignoreOrder = true;
}

actions.replaceWebpackConfig(config);
}
};

exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions;
const typeDefs = `
Expand Down
Loading

0 comments on commit b110642

Please sign in to comment.