This example features:
- An app using proposed 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
.babelrcfile, you need to addnext/babelas a preset.
Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-custom-babel-config with-custom-babel-config-appyarn create next-app --example with-custom-babel-config with-custom-babel-config-apppnpm create next-app --example with-custom-babel-config with-custom-babel-config-appDeploy it to the cloud with Vercel (Documentation).