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

[Bug]: Global polyfill no longer seems to work #6984

Closed
isuro opened this issue Jun 28, 2024 · 4 comments
Closed

[Bug]: Global polyfill no longer seems to work #6984

isuro opened this issue Jun 28, 2024 · 4 comments
Labels
bug Something isn't working need reproduction pending triage The issue/PR is currently untouched.

Comments

@isuro
Copy link

isuro commented Jun 28, 2024

System Info

System:
OS: Linux 6.9 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (8) arm64 unknown
Memory: 4.82 GB / 23.43 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
Yarn: 4.1.0 - ~/.nvm/versions/node/v20.11.0/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
Browsers:
Chromium: 115.0.5790.75
npmPackages:
@rspack/core: ^0.7.5 => 0.7.5
@rspack/dev-server: ^0.7.5 => 0.7.5

Details

After upgrading from rspack 0.7.0 to 0.7.5, global is no longer polyfilled for browser environments. This is true when left at the default behavior or when explicitly passing node: {global: true}.

Reproduce link

No response

Reproduce Steps

  1. Run rspack over code that uses global
    In our case, the specific line that fails is const g: any = global;
  2. Global is undefined
@isuro isuro added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jun 28, 2024
@xc2 xc2 added need reproduction and removed pending triage The issue/PR is currently untouched. labels Jun 29, 2024
Copy link
Contributor

Hello @isuro, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

@xc2
Copy link
Collaborator

xc2 commented Jun 29, 2024

tried to reproduce with no luck, would you please help creating a repo with reproductable setup.

@isuro
Copy link
Author

isuro commented Jul 12, 2024

I think the specific issue may have been code like this:

const g = global

g.foo = BAR
...

@xc2 xc2 added the pending triage The issue/PR is currently untouched. label Jul 14, 2024
Copy link
Contributor

Since the issue was labeled with need reproduction, but no response in 14 days. This issue will be closed. Feel free to comment and reopen it if you have any further questions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need reproduction pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

2 participants