-
-
Notifications
You must be signed in to change notification settings - Fork 504
fix: failed to parse bundle with IIFE #685
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
base: main
Are you sure you want to change the base?
Conversation
|
@evenstensberg We need to add test cases |
evenstensberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs test cases 😄
valscion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah this might work but it looks like we would not be parsing any modules when this IIFE bundle is used? Is that expected?
Anyway, this looks good! Could you still add a changelog entry?
|
@valscion In this case there are no modules, anyway in our TODOs to add all test cases for ES modules with and without IIFE, it is just an edge case |
|
Yeah that's true. I'll add a changelog entry myself when I have the time or then @hai-x can add one — I'll merge once the changelog is there and release when I have a good slot :) |
Summary
What kind of change does this PR introduce?
Fixes #684, #409.
Did you add tests for your changes?
It seems we currently don’t support parsing top-level chunk modules and i’m also not sure whether parsing is the right approach for get rendered chunk modules.
e.g.
So i add one simple IIFE case here without chunk modules.
Here is test result before fixing:

Does this PR introduce a breaking change?
No
If relevant, what needs to be documented once your changes are merged or what have you already documented?
No