j40-cejst-2/client/gatsby-node.js

21 lines
591 B
JavaScript
Raw Normal View History

path = require('path');
// 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 }) => {
actions.setWebpackConfig({
devtool: 'eval-source-map',
});
if (stage === "build-html" || stage === "develop-html") {
actions.setWebpackConfig({
module: {
rules: [
{
test: /@trussworks\/react-uswds/,
use: loaders.null(),
},
],
}
})
}
}