j40-cejst-2/client/gatsby-node.js
Nat Hillard 13a4e5f47a
Adding Trussworks USWDS React Wrapper (#67)
* removing unused js
* Working for first load, second raises 'failed to SSR' without DEV_SSR enabled. We will need to fix this before prod
2021-05-20 21:54:08 -04:00

16 lines
No EOL
500 B
JavaScript

// Disable references to window from trussworks/uswds
// See here: https://www.gatsbyjs.com/docs/debugging-html-builds/#fixing-third-party-modules
exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
if (stage === "build-html" || stage === "develop-html") {
actions.setWebpackConfig({
module: {
rules: [
{
test: /@trussworks\/react-uswds/,
use: loaders.null(),
},
],
},
})
}
}