Skip to content

Conversation

@hai-x
Copy link
Member

@hai-x hai-x commented Dec 15, 2025

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.

const __webpack_modules__ = [,,,...]

So i add one simple IIFE case here without chunk modules.

Here is test result before fixing:
image

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

@alexander-akait
Copy link
Member

@evenstensberg We need to add test cases

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

Needs test cases 😄

Copy link
Member

@valscion valscion left a 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?

@alexander-akait
Copy link
Member

@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

@valscion
Copy link
Member

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 :)

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.

When output.module is true: Cannot read properties of undefined (reading 'arguments')

4 participants