infoscreen/gatsby-node.js

27 lines
508 B
JavaScript
Raw Normal View History

2022-01-05 21:15:29 +01:00
const webpack = require('webpack');
2022-01-03 13:33:42 +01:00
exports.onCreateWebpackConfig = ({
2022-01-05 21:15:29 +01:00
stage,
rules,
loaders,
plugins,
actions,
}) => {
actions.setWebpackConfig({
resolve: {
alias: {
process: 'process/browser'
},
fallback: {
"os": require.resolve("os-browserify/browser"),
"url": require.resolve("url/")
2022-01-03 13:33:42 +01:00
}
2022-01-05 21:15:29 +01:00
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
],
})
}