Skip to content

Instantly share code, notes, and snippets.

@evoratec
Last active June 22, 2021 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evoratec/792fd85e34a91e2ac9f724487709eb4f to your computer and use it in GitHub Desktop.
Save evoratec/792fd85e34a91e2ac9f724487709eb4f to your computer and use it in GitHub Desktop.
Solución Next 10 y 11 actualización Webpack
const { resolveHref } = require("next/dist/next-server/lib/router/router");
module.exports = {
env: {
GA_ENV: process.env.GA_ENV,
},
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false
}
}
return config;
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment