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

Use webpack to build browser-targeted distribution #343

Open
BurtHarris opened this issue Dec 15, 2017 · 1 comment
Open

Use webpack to build browser-targeted distribution #343

BurtHarris opened this issue Dec 15, 2017 · 1 comment
Assignees
Milestone

Comments

@BurtHarris
Copy link
Collaborator

BurtHarris commented Dec 15, 2017

Longstanding issue #311 seems best addressed using a the Webpack build tool.

This may break imports with explicit paths! This is because Webpack packs all the code into a single (or small number) of downloadable bundles. This is a performance optimization, particularly for browser-based code. I'm still working on details, but by using output.libraryType = "umd" it generates Universal Module Definition file which can be consumed both from node.js and from browsers. This seems to cover a lot of ground.

Additional notes:

  • Information on using webpack for libraries at https://webpack.js.org/guides/author-libraries/
  • Typescript integration: several options exist, initial attempt will use ts-loader
  • Use of umd for output.libraryType generates a single file which can be consumed both from node.js and from browsers.
@harry-kalligeros
Copy link

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants