-
-
Notifications
You must be signed in to change notification settings - Fork 781
Closed
web-infra-dev/rsbuild
#3873Labels
bugSomething isn't workingSomething isn't working
Description
System Info
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory: 1.82 GB / 7.83 GB
Binaries:
Node: 22.6.0 - ~\AppData\Local\fnm_multishells\14848_1725611723399\node.EXE
npm: 10.8.2 - ~\AppData\Local\fnm_multishells\14848_1725611723399\npm.CMD
pnpm: 9.7.0 - ~\AppData\Local\fnm_multishells\14848_1725611723399\pnpm.CMD
bun: 1.1.21 - ~.bun\bin\bun.EXE
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.4355
npmPackages:
@rspack/core: 1.0.3 => 1.0.3
Details
Hi, I'm using Rsbuild environment API to build a client and a server. There are 3 problems with my repro:
queueMicrotaskis not defined in ESM environment during dev
Ienforced both bundleto output ESM (disabled esm on client since rsbuild can't output <script type="module">). But for some reasonqueueMicrotaskis not available in ESM environment during dev. If I configure my ssr environment to output in CJS, it works as expected and no error. Only in ESM and dev mode this error raises.
- Even though I have
"type": "module"in my package.json, Rspack trying to load a module as CJS module. So I had to add this config in my config:
filename: {
js: "[name].mjs",
},- If I configure dist path something that starts with a dot (.), printed URLs are weird:
output: {
inlineStyles: true,
inlineScripts: true,
distPath: {
root: ".output/client",
},
cleanDistPath: true,
target: "web",
}, > Local: http://localhost:3000/../C:\Users\user\dev\vobyssr\apps\web\.output\client/Reproduce link
https://github.com/sibbng/voby-ssr-demo
Reproduce Steps
- pnpm i
- pnpm build
- pnpm dev
- Visit localhost:3000
- Check console you will see
ReferenceError: queueMicrotask is not defined
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

