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

feat(cli): Deno.emit supports bundling as IIFE #9291

Merged
merged 2 commits into from
Feb 16, 2021

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Jan 27, 2021

Closes #9204

Thanks @kdy1 for adding it to swc! Finally got around to adding it to Deno.

@kitsonk kitsonk mentioned this pull request Jan 27, 2021
22 tasks
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

assert(diagnostics);
assertEquals(diagnostics.length, 0);
assertEquals(Object.keys(files).length, 1);
assert(files["deno:///bundle.js"].startsWith("function() {\n"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it start with (function() {\n?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I made a mistake.
I'll fix it and publish a new version. (fixer should be called after wrapping with iife, but it's not)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I published a new version of swc_bundler.

@kitsonk kitsonk added this to the 1.8.0 milestone Jan 27, 2021
@kitsonk
Copy link
Contributor Author

kitsonk commented Jan 27, 2021

Since this is a new feature (albeit for an unstable option) I don't think we should land this until 1.8. It should be relatively easy to rebase, so we can update the bundler from swc for it.

@kitsonk kitsonk merged commit 7e9028b into denoland:master Feb 16, 2021
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 this pull request may close these issues.

Deno.emit() should support IIFE bundles
3 participants