-
-
Notifications
You must be signed in to change notification settings - Fork 239
Open
Description
Version
System:
OS: macOS 26.0.1
CPU: (12) arm64 Apple M3 Pro
Memory: 546.80 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Browsers:
Chrome: 142.0.7444.60
Firefox: 142.0.1
Safari: 26.0.1
npmPackages:
@rsbuild/core: 1.6.3Details
when bundling server code, dev.assetPrefix is used for node files as well (on dev only) and this breaks imports of worker_threads.
import {Worker} from 'worker_threads';
const worker = new Worker(new URL('./worker.ts', import.meta.url));
Reproduce link
https://github.com/felixmosh/rsbuild-bug-assetprefix
Reproduce Steps
On dev
- pnpm install
- pnpm dev (files should be generated)
- exit
- node dist/server/index.js
// fails since dev.assetPrefix is used (not relevant for node env IMO)
On build
- pnpm build
- node dist/server/index.js
// fails since output.assetPrefix on node enviroment is ignored and set to be / which is an absolute path = new URL uses only it.
Metadata
Metadata
Assignees
Labels
No labels