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

Use project-wide babel.config.json configured to target supported browsers #1264

Closed
liangyuanruo opened this issue Mar 2, 2021 · 0 comments · Fixed by #1338
Closed

Use project-wide babel.config.json configured to target supported browsers #1264

liangyuanruo opened this issue Mar 2, 2021 · 0 comments · Fixed by #1338
Labels
P2 Not urgent, but work on it once you're done with current tasks tech debt

Comments

@liangyuanruo
Copy link
Contributor

liangyuanruo commented Mar 2, 2021

It is good practice in Babel 7.x to use a project-wide babel.config.json instead of .babel.rc, which is a relic of Babel 6.x (we are on 7.x).

The configuration file should also explicitly specify the supported application browsers to ensure longer-term compatibility of JS build.

See https://babeljs.io/docs/en/config-files#6x-vs-7x-babelrc-loading, as well as the FormSG codebase for an example.

@liangyuanruo liangyuanruo added P2 Not urgent, but work on it once you're done with current tasks tech debt labels Mar 2, 2021
LoneRifle pushed a commit that referenced this issue Mar 24, 2021
It is good practice in Babel 7.x to use a project-wide babel.config.json instead of .babel.rc, which
is a relic of Babel 6.x (we are on 7.x).
- implemented babel.config.json based on FormSG's current configuration

fix #1264
LoneRifle pushed a commit that referenced this issue Mar 24, 2021
- Added corejs and regenerator-runtime dependencies for babel preset-env

fix #1264
LoneRifle pushed a commit that referenced this issue Mar 24, 2021
It is good practice in Babel 7.x to use a project-wide babel.config.json 
instead of .babelrc, which is a relic of Babel 6.x (we are on 7.x).

- implement babel.config.json based on FormSG's current configuration
- add corejs and regenerator-runtime dependencies for babel preset-env

fix #1264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Not urgent, but work on it once you're done with current tasks tech debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant