Skip to content

Instantly share code, notes, and snippets.

@MaikelVeen
Created January 9, 2021 21:34
Show Gist options
  • Save MaikelVeen/60a275a79c51174176aebf1d51ae0777 to your computer and use it in GitHub Desktop.
Save MaikelVeen/60a275a79c51174176aebf1d51ae0777 to your computer and use it in GitHub Desktop.
Fixing the client bundle build
module.exports = {
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.node = {
fs: 'empty'
}
}
return config
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment