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

Build JavaScript using Pacel #13

Merged
merged 8 commits into from
Sep 2, 2020
Merged

Build JavaScript using Pacel #13

merged 8 commits into from
Sep 2, 2020

Conversation

aminya
Copy link
Member

@aminya aminya commented Sep 2, 2020

This speeds up the loading time by tree-shaking and prebuilding CoffeeScript

@aminya aminya force-pushed the parcel branch 3 times, most recently from c86ec72 to c7c2153 Compare September 2, 2020 01:33
@aminya
Copy link
Member Author

aminya commented Sep 2, 2020

This does not work yet because of prebuild/node-gyp-build#22

@aminya
Copy link
Member Author

aminya commented Sep 2, 2020

I fixed the problem by setting the dist as the root folder.

@rajendrant
Copy link
Collaborator

I wonder if using the parcel library is not needed, if we convert the coffee (only one main file) to js.
The other changes in the PR like babel, shx, cross-env are certainly fine.

Run all benchmarks in CI
@aminya
Copy link
Member Author

aminya commented Sep 2, 2020

The main benefit of using this is to use Parcel to tree-shake the dependencies. For example, we don't use all of the original fuzzaldrin-plus. This bundles and minifies the whole thing which loads much faster.

Original size: 27.69
New size: 10.77

This is a typical performance improvement pattern we have found by testing many packages in our organization.

@aminya aminya added the enhancement New feature or request label Sep 2, 2020
@aminya
Copy link
Member Author

aminya commented Sep 2, 2020

All the tests pass. I will merge this!

@aminya aminya merged commit bd70661 into master Sep 2, 2020
@aminya aminya deleted the parcel branch February 16, 2021 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants