silverwolf-x's picture
|
download
raw
1.42 kB
# Using a custom Babel config
This example features:
- An app using proposed [do expressions](https://babeljs.io/docs/plugins/transform-do-expressions/).
- It uses babel-preset-stage-0, which allows us to use above JavaScript feature.
- It uses '.babelrc' file in the app directory to add above preset.
> Most of the time, when writing a custom `.babelrc` file, you need to add `next/babel` as a preset.
## Deploy your own
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-custom-babel-config&project-name=with-custom-babel-config&repository-name=with-custom-babel-config)
## How to use
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
```bash
npx create-next-app --example with-custom-babel-config with-custom-babel-config-app
```
```bash
yarn create next-app --example with-custom-babel-config with-custom-babel-config-app
```
```bash
pnpm create next-app --example with-custom-babel-config with-custom-babel-config-app
```
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).

Xet Storage Details

Size:
1.42 kB
·
Xet hash:
18a84b49e89a562710783863775053667cb5c161422b814e6c1ea66f4930634b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.