Back to Next Js

With Polyfills

examples/with-polyfills/README.md

16.2.51.5 KB
Original Source

With Polyfills

Next.js supports modern browsers with no required configuration. It also adds some polyfills by default.

If your own code or any external npm dependencies require features not supported by your target browsers, you need to add polyfills yourself.

In this case, you should add a top-level import for the specific polyfill you need in your root layout or the individual component.

Deploy your own

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

bash
npx create-next-app --example with-polyfills with-polyfills-app
bash
yarn create next-app --example with-polyfills with-polyfills-app
bash
pnpm create next-app --example with-polyfills with-polyfills-app

Deploy it to the cloud with Vercel (Documentation).