Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
undavide committed Oct 8, 2024
1 parent bd2cf7d commit 0e6578b
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions
const { createTypes } = actions;
createTypes(`
type SiteSiteMetadata {
template_id: String
product_name: String
}
`)
}
`);
};

exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
if (stage === "build-javascript" || stage === "develop") {
const config = getConfig();
actions.replaceWebpackConfig({
...config,
optimization: {
...config.optimization,
splitChunks: {
chunks: "all",
name: false,
cacheGroups: {
styles: {
name: "styles",
test: /\.(css|scss)$/,
chunks: "all",
enforce: true,
},
},
},
},
});
}
};

0 comments on commit 0e6578b

Please sign in to comment.