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

Remove deprecated core-js version from production builds #15898

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

zofskeez
Copy link
Contributor

@zofskeez zofskeez commented Jun 8, 2022

Several dependencies used by Vault UI were using a now deprecated version of core-js (2.6.11) which was causing vulnerability scans to fail. To resolve this, the following steps were taken to remove the deprecated version of core-js from production builds:

Doing a search in the vendor file of a production ember build after the changes yields zero results for core-js and/or 2.6.11. Additionally, the build time dropped significantly from 6 minutes to just over 1 minute:

Before
ember-build-main
After
ember-build-no-polyfills

It would be ideal to use @babel/plugin-transform-runtime with core-js 3 but I couldn't get it working with ember-cli-babel and the useBabelConfig option. Hopefully ember-cli-babel will be updated to remove the @babel/polyfill entirely and support the recommendation to use core-js directly.

Related ember-cli-babel issues:
emberjs/ember-cli-babel#443
emberjs/ember-cli-babel#444
emberjs/ember-cli-babel#417
emberjs/ember-cli-babel#446

@zofskeez zofskeez added the ui label Jun 8, 2022
@zofskeez zofskeez added this to the 1.12.0-rc1 milestone Jun 8, 2022
Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent description of changes and how you approached this. Thank you so much! 🚀

@zofskeez zofskeez merged commit 05f9202 into main Jun 9, 2022
@zofskeez zofskeez deleted the ui/VAULT-5898/remove-deprecated-corejs branch June 9, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants