Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timneutkens/with-polyfills-app
https://github.com/timneutkens/with-polyfills-app
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/timneutkens/with-polyfills-app
- Owner: timneutkens
- Created: 2020-03-11T10:12:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-06T18:28:51.000Z (almost 5 years ago)
- Last Synced: 2024-10-05T12:41:55.141Z (3 months ago)
- Homepage:
- Size: 175 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example app with polyfills
Next.js supports browsers from IE10 to the latest. It adds polyfills as they need. But Next.js cannot add polyfills for code inside NPM modules. So sometimes, you need to add polyfills by yourself.
This how you can do it easily with Next.js's custom webpack config feature.
## Deploy your own
Deploy the example using [ZEIT Now](https://zeit.co/now):
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-polyfills)
## How to use
### Using `create-next-app`
Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
```bash
npm init next-app --example with-polyfills with-polyfills-app
# or
yarn create next-app --example with-polyfills with-polyfills-app
```### Download manually
Download the example:
```bash
curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-polyfills
cd with-polyfills
```Install it and run:
```bash
npm install
npm run dev
# or
yarn
yarn dev
```Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).