Skip to content

[Bug]: webpackIgnore magic comment is not working for new URL calls #10546

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

Closed
leonardlib opened this issue Jun 2, 2025 · 0 comments · Fixed by #10570
Closed

[Bug]: webpackIgnore magic comment is not working for new URL calls #10546

leonardlib opened this issue Jun 2, 2025 · 0 comments · Fixed by #10570
Labels
pending triage The issue/PR is currently untouched.

Comments

@leonardlib
Copy link

System Info

System:

OS: macOS 15.3.2
CPU: (8) arm64 Apple M1
Memory: 96.55 MB / 16.00 GB
Shell: 5.9 - /bin/zsh

Binaries:

Node: 22.13.1 - ~/.nvm/versions/node/v22.13.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v22.13.1/bin/yarn
npm: 10.9.2 - ~/.nvm/versions/node/v22.13.1/bin/npm

Browsers:

Chrome: 136.0.7103.114
Edge: 137.0.3296.52
Safari: 18.3.1

npmPackages:

@rspack/cli: ^1.3.13 => 1.3.13
@rspack/core: ^1.3.13 => 1.3.13
@rspack/dev-server: ^1.1.2 => 1.1.2
@rspack/plugin-minify: ^0.7.5 => 0.7.5
@rspack/plugin-react-refresh: ^1.4.3 => 1.4.3

Details

You already made a fix for this behaviour: #10444

But now, for some reason, the build process is failing:

Here is my code:

pdfjs.GlobalWorkerOptions.workerSrc = new URL(
  /* webpackIgnore: true */ 'pdfjs-dist/legacy/build/pdf.worker.min.js',
  import.meta.url,
).toString();

And the output is:

Image

Reproduce link

No response

Reproduce Steps

npx nx run my-app:build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending triage The issue/PR is currently untouched.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant