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 unneccessary double-polyfills from runtime #807

Merged
merged 1 commit into from Nov 13, 2017

Conversation

FredKSchott
Copy link
Contributor

From the babel-polyfill docs:

Babel includes a polyfill that includes a custom regenerator runtime and core-js.

This will emulate a full ES2015+ environment and is intended to be used in an application rather than a library/tool. This polyfill is automatically loaded when using babel-node.

ripple-lib is already using babel to transpile all advanced features and add necessary polyfills, so loading "babel-polyfill" additionally is unnecessary. Worse, it means that all polyfills are being double-loaded and potentially double-executed.

Removing this line results in a much smaller build (ripple-latest.js 1.4MB vs 1.7MB) and a much faster load time (require("./ripple-latest.js") 267ms vs 337ms).

Also removed "babel-runtime" dependency (no longer used) & some outdated comments.

Copy link
Collaborator

@intelliot intelliot left a comment

Choose a reason for hiding this comment

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

Great catch. Thanks!

@intelliot intelliot merged commit 44119dd into XRPLF:develop Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants