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

commonjs plugin add extra query to chunk facadeModuleId in renderChunk hook without removing #1195

Closed
huozhi opened this issue May 26, 2022 · 2 comments

Comments

@huozhi
Copy link
Contributor

huozhi commented May 26, 2022

Expected Behavior

The input ts file with shebang will be preserved

Actual Behavior

The input ts file with shebang is omitted

Additional Information

The reproduction is using ts plugin, commonjs plugin and preserve shebang plugin (non official one), and when bumping commonjs plugin to v0.22, it will break the shebang preseving logic. I digged a little bit deep found that the facadeModuleId in renderChunk hook of shebang plugin is always having a ?commonjs-entry query. It works well when I downgrade commonjs plugin to v0.21

@lukastaegert
Copy link
Member

I fear the shebang plugin will need to be adjusted as it relies on the brittle assumption that an entry module will automatically become the facade module of a chunk while it has always been possible that another plugin injects a proxy module, just like the commonjs plugin needs to do it now. See #1169 (comment) for a possible solution and more detailed reasoning.

@stale
Copy link

stale bot commented Jul 31, 2022

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

@stale stale bot closed this as completed Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants