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

Add UMD version to "dist" folder #14

Closed
dpilafian opened this issue Feb 27, 2019 · 8 comments
Closed

Add UMD version to "dist" folder #14

dpilafian opened this issue Feb 27, 2019 · 8 comments

Comments

@dpilafian
Copy link
Contributor

The rollup module bundler has a --format umd option to output a UMD version that would simplify using Simple-DataTables in many projects.

@johanneswilm
Copy link
Member

Ok, added

@dpilafian
Copy link
Contributor Author

Does issue #24 "Dynamic loading merged" preclude issue #15 "Add UMD version to dist folder"?

@johanneswilm
Copy link
Member

@dpilafian: It is a while ago since I worked on the dynamic loading (December) but the way I remember it rollup outputs entirely different outputs once dynamic loading is enabled. One of them (no modules) should cover more or less what used to be UMD.
I can try to investigate that again, but maybe it's easier if you could look at what rollup options tweaks would work with your requirements.

@johanneswilm johanneswilm reopened this May 11, 2019
@johanneswilm
Copy link
Member

@dpilafian Yes, so trying to build a UMD version gives this error:

Error: UMD and IIFE output formats are not supported for code-splitting builds.

I can see there is a discussion about it here [1], but no solution. It seems like there it should be possible to create UMD outputs which just don't split the code from the same sources. I'm not sure why/if this hasn't been tried. Maybe you can find more about it.

[1] rollup/rollup#2072

@dpilafian
Copy link
Contributor Author

Yep, I encountered the same error. I have not found a workaround yet.

@johanneswilm
Copy link
Member

I see someone commented he'd prefer not to go back to webpack. If that means it works if we switch from rollup to webpack, then that would be an option as well.

@dpilafian
Copy link
Contributor Author

BTW, the desire here is for raw speed (I don't care about supporting old browsers... the opportunity cost of supporting old browsers is generally more than an order of magnitude greater than anyone expects). I unify, minify, and revision library files and then upload them to a CDN with 10 year cache expire headers so that there will only be one single HTTP request to get the libraries once every couple months for new versions. For my use case, I optimize for speed over memory.

@johanneswilm
Copy link
Member

fixed - again. Thanks!

rhoit pushed a commit to beta-analytics/sdt that referenced this issue May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants