-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
swc_bundler: support outputting an IIFE #1184
Comments
A couple of other considerations:
|
Hello, I'm really interested in using the IIFE output from swc_bundler. Do you have any piece of advice regarding how this can be setup ? |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the feature
Currently, swc_bundler can output an ES module, but it does support output as an IIFE.
For outputting the bundle, instead of
export
ing entries from the entry module in the bundle,swc_bundler
would output an IIFE where the return value of the IIFE is the value of the exported module. For example if the entry module was:a.js
The output of the bundle would be something like:
a.bundle.js
Babel plugin or link to the feature description
There are Babel plugins that in theory can do this, but IIFE output is one of the builtin output formats of Rollup (and other bundlers).
Additional context
In particular with Deno, we would like to have an option for
Deno.bundle()
to be able to output a single file ES module or an IIFE.The text was updated successfully, but these errors were encountered: