0

Webpack 5 does NOT include polyfills for node_modules by default.

The answer to this question says to modify webpack.config.js with the suggestions from the error messages.

My question is, which one?

(yt-fork-env) ryanjsfx@MB-145 pitch-v5 % find . -name webpack.config.js

./node_modules/istanbul-reports/lib/html-spa/webpack.config.js 
./node_modules/number-to-bn/internals/webpack/webpack.config.js 
./node_modules/ethjs-unit/internals/webpack/webpack.config.js 
./node_modules/oboe/webpack.config.js 
./node_modules/react-scripts/config/webpack.config.js 
./node_modules/@motionone/dom/webpack.config.js 
./node_modules/aos/webpack.config.js

I started out by modifying the one in react-scripts but it just totally ignored a fallback I added. I guess I could write a script to add fallbacks to all of them...but it'd be nice to know if I could just add fallbacks to one of them (and how to determine that).

Ryan Farber
  • 343
  • 1
  • 4
  • 11

1 Answers1

0

As it turns out, any of them work, I just had to hard reload (Cntrl-C and then npm run start again).

Ryan Farber
  • 343
  • 1
  • 4
  • 11