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

fix(build): bundle non-inlined workers with rollup #2494

Merged
merged 4 commits into from Jun 27, 2021
Merged

Conversation

modderme123
Copy link
Contributor

Fixes #2493

@antfu antfu added p3-minor-bug An edge case that only affects very specific usage (priority) and removed 🔍 review needed labels Jun 25, 2021
@antfu
Copy link
Member

antfu commented Jun 26, 2021

Tested with https://github.com/wheatjs/vueuse-playground by @wheatjs (using Monaco), it was not working properly on FireFox and with this PR now it does.

@Mesteery
Copy link
Contributor

I changed this from es to iife because Firefox was running into trouble with default exports still being exported (something like unexpected top level export), so this was how I got rid of those imports and exports. I believe this module is standalone because you can't import code from a worker bundle so afaik this is not a breaking change, although it may make bundles a few bytes larger with the iife (Immediately Invoked Function Expression, which basically wraps the bundle with (()=>{code})() so that variables don't conflict with other bundles).

This is definitely a breaking change. The proof? Me.

I have to use an ES import in my worker, and since this commit it's impossible for me to do that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Worker chunks not fully bundled in production
5 participants