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

Document iife format #595

Closed
hastebrot opened this issue Apr 24, 2020 · 1 comment · Fixed by #601
Closed

Document iife format #595

hastebrot opened this issue Apr 24, 2020 · 1 comment · Fixed by #601

Comments

@hastebrot
Copy link

The README.md could mention the iife format.

This works using microbundle 0.11.0 and 0.12.0-next.8.

$ microbundle build --format=iife --output=dist/
@mindplay-dk
Copy link

You might want to do something more here?

It's not at all obvious that microbundle can be used for applications - I've looked at it dozens of times, I've even used it a few times, and never realized until just now, after finding this issue, that iife is even supported.

Everything else in the README seems to point to the idea that microbundle is for libraries only.

The zero-configuration bundler for tiny modules, powered by Rollup.

Seems to suggest this only works for modules. (Git project title says the same thing.)

One dependency to bundle your library using only a package.json

Could mention "library/project" maybe?

Creates multiple output formats for each entry (CJS, UMD & ESM)

Could mention IIFE here maybe?

Microbundle produces esm, cjs, umd bundles with your code compiled to syntax that works pretty much everywhere.

Again, fails to mention IIFE being an option.

I've been torturing myself with custom builds, lengthy Babel configurations, failed attempts at configuring webpack or rollup, and so on... microbundle is really easy to use for libraries, and probably will be for my application too? I wish I had known sooner that this was possible. 😊

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

Successfully merging a pull request may close this issue.

2 participants