-
According to the official examples, it is best practice to add your custom polyfills to Webpack's This is the example i'm referring to. As a side note, I find it very cumbersome (especially for newbies) to modify the Webpack config in order to add polyfills. Perhaps Next.js could offer a simpler way to do this? Something like an optional file |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Next offers built-in polyfills as of 9.3. The list can be found here |
Beta Was this translation helpful? Give feedback.
-
Answering myself as I dug more into this... Turns out the with-polyfills example is known to cause issues with bundling. The proper way (and best practice) to add custom polyfills is to include them as the first line into |
Beta Was this translation helpful? Give feedback.
Answering myself as I dug more into this...
Turns out the with-polyfills example is known to cause issues with bundling.
The proper way (and best practice) to add custom polyfills is to include them as the first line into
pages/_app.js
. (source: #13766 )