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

Don't inline Worker and WASM when building ESM #12

Open
bminixhofer opened this issue Aug 2, 2020 · 0 comments
Open

Don't inline Worker and WASM when building ESM #12

bminixhofer opened this issue Aug 2, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bminixhofer
Copy link
Owner

As mentioned in https://github.com/bminixhofer/tractjs/blob/master/README.md#what-about-size not inlining the Worker and WASM would reduce size. With the recent changes in the build system this should be much easier than before.

At the moment the WASM is actually doubly inlined, once in the worker.js, then the worker.js is again inlined in tractjs.js. The WASM itself is only 4.7MB (1.0MB gzipped) so fixing this would reduce the size by roughly 50%! But it is of course only possible for the ESM build, not for tractjs.min.js.

The CJS build for Node.js will also still be inlined (for now) since size is not as big of an issue for Node applications and I don't want to get into any file system issues.

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

No branches or pull requests

1 participant