-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 system for 2019 #1759
Comments
New languages should move to npm, and not maintained by us. We need to look at how Babel plugins work, for instance. People should not be blocked on us and should not depend on us for their own languages. |
I tested just now the custom build with and without compression. I still minified it... I just skipped compress log, replace2,3,4, etc... The file sizes (pre gzip) were 743kb vs 792kb... (that's a full build AFAIK, no limits specified) And after gzip: Isn't the assumption now that everyone is gziping everything? Could all the custom compression stuff simply be removed and we switch to ES6 modules... so you get the node/npm setup for free... then use something light like rollup to build the modules into a web friendly format (with a tiny bit of help from a build wrapper). That same wrapper could be tweaked to make dropping in external repos and just "linking" them easy when building a web version of the script... Thoughts? |
Our build system has outlived its time and needs to be replaced.
Current principles
The library has to work in the browser as well as on the server under node.js. To achieve this the code is kept devoid of any module structure and the build system is responsible for wrapping and concatenating files into either a browser-ready script or a node.js compatible module.
We don't simply host a library on npm and use a browserifying solution because our custom build system has custom compression code which is more efficient than generic solutions. It used to matter when we tried to keep the default build size under 30 KB.
Browsers seriously suck at requesting many resources at once over HTTP/1.1, which is the reason to have a single packed file with the core and a subset of languages.
There is a "common" subset of languages which is built for every release and hosted on a CDN. It is a subset because the full set weighs 500+ KB and most of the languages is a long tail that most users don't need.
Pain points
Proposals
The text was updated successfully, but these errors were encountered: