Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Examples] Remove with-polyfills #10563

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 1 addition & 44 deletions examples/with-polyfills/README.md
@@ -1,44 +1 @@
# 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/new/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/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
This example has been deprecated and removed in favor of Next.js polyfills chunk ([#10212](https://github.com/zeit/next.js/pull/10212)), which does a better work at identifying the required polyfills for non-modern browsers.
13 changes: 0 additions & 13 deletions examples/with-polyfills/client/polyfills.js

This file was deleted.

19 changes: 0 additions & 19 deletions examples/with-polyfills/next.config.js

This file was deleted.

14 changes: 0 additions & 14 deletions examples/with-polyfills/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions examples/with-polyfills/pages/index.js

This file was deleted.