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]: prod build marks worker export as not used #4639

Open
felixmosh opened this issue Feb 23, 2025 · 0 comments
Open

[Bug]: prod build marks worker export as not used #4639

felixmosh opened this issue Feb 23, 2025 · 0 comments

Comments

@felixmosh
Copy link

Version

System:
    OS: macOS 15.3.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 318.75 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 133.0.6943.127
    Safari: 18.3
  npmPackages:
    @rsbuild/core: ^1.2.8 => 1.2.11

Details

for some reason prod build marks the exported function as not used.

Reproduce link

https://github.com/felixmosh/rsbuild-worker-prod-bug

Reproduce Steps

  1. yarn install
  2. yarn dev - (check that all works, the worker prints worker content)
  3. yarn build
  4. node ./dist/server.js - fails since the exported variable is marked as unused (based on the comments)
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

No branches or pull requests

1 participant