Open Lukenickerson opened 9 months ago
Hi and thank you for your suggestion. Can you please create a branch with an implementation that looks like what you propose here? I'm curious to see how it would look like and how to use it in a JS game. If it doesn't add too many bytes to the zip, it could replace the main version.
Here's a working version of an ESM build: https://github.com/rocket-boots/W/blob/057c2786ff92a230c7b7877436954ae95b0a5e03/w.esm.js#L4 I'm working on an implementation in a game.
Lines changed are:
AB
and BC
export
@xem -- Do you have the process of creating the zip documented? Then I could do a build and compare sizes.
sorry, it was long ago and I don't remember it in detail but I'm quite sure I used Terser (https://try.terser.org/) to minify and ECT to optimize the zip (https://github.com/fhanau/Efficient-Compression-Tool) with a command like ./ect.exe -9 -zip ./W.zip
Background
ESM (modules) are the future; they let developers handle dependencies without polluting the
window
scope.Improvements
w.esm.js
build that usesexport default W
Challenges
Can this be done in a way that...