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

fix(web): generate .swcrc file with modern defaults when creating new webapps #18749

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Aug 21, 2023

Currently, when generating a new webapp (i.e. nx g @nx/web:app myapp), we create a .babelrc file instead of .swcrc. This makes customizing the build confusing.

This PR adds the .swcrc file when generating a new app, and also sets target to es2016 since modern browsers do not need ES5 to work. Also updated the .swcrc file for React apps to set the target to es2016 as well (which matches how our babel config targets esnext).

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #18735

@jaysoo jaysoo requested review from a team as code owners August 21, 2023 17:32
@vercel
Copy link

vercel bot commented Aug 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2023 6:55pm

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing tsconfig compilerOptions.target doesn't change build from es2015 to es6
2 participants