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]: Rspack.ProvidePlugin not work with worker-rspack-loader #8553

Closed
GiveMe-A-Name opened this issue Nov 27, 2024 · 0 comments · Fixed by #8570
Closed

[Bug]: Rspack.ProvidePlugin not work with worker-rspack-loader #8553

GiveMe-A-Name opened this issue Nov 27, 2024 · 0 comments · Fixed by #8570
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@GiveMe-A-Name
Copy link
Member

System Info

System:
OS: macOS 13.6.5
CPU: (10) arm64 Apple M1 Pro
Memory: 3.49 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Yarn: 1.22.22 - ~/Library/Application Support/fnm/node-versions/v18.18.2/installation/bin/yarn
npm: 9.8.1 - ~/Library/Application Support/fnm/node-versions/v18.18.2/installation/bin/npm
pnpm: 9.12.2 - ~/Library/Application Support/fnm/node-versions/v18.18.2/installation/bin/pnpm
bun: 1.0.21 - ~/.bun/bin/bun
Browsers:
Chrome: 131.0.6778.86
Safari: 16.6
npmPackages:
@rspack/cli: ^1.1.4 => 1.1.4
@rspack/core: ^1.1.4 => 1.1.4
@rspack/plugin-react-refresh: 1.0.0 => 1.0.0

Details

Using ProvidePlugin to automatically load lodash failed due to js is handle by worker-rspack-loader.

Reproduce link

https://github.com/GiveMe-A-Name/rspack_worker_loader

Reproduce Steps

  1. pnpm install
  2. npm run dev
  3. visit http://localhost:8080

Page would occur error like bellow

Uncaught ReferenceError: _ is not defined
    at handleError (http://localhost:8080/main.js:7396:64)
    at http://localhost:8080/main.js:7416:13
@GiveMe-A-Name GiveMe-A-Name added bug Something isn't working pending triage The issue/PR is currently untouched. labels Nov 27, 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 pending triage The issue/PR is currently untouched.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant