rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Bug]: Upgrade from 1.5.8 to 1.6.0 results in error "Uncaught SyntaxError"

Open rudolfolah opened this issue 1 month ago • 2 comments

System Info

System:
  OS: macOS 15.7.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 2.51 GB / 18.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 20.19.1 - ~/.nvm/versions/node/v20.19.1/bin/node
  npm: 10.8.2 - ~/.nvm/versions/node/v20.19.1/bin/npm
Browsers:
  Chrome: 142.0.7444.60
  Safari: 18.6
npmPackages:
  @rspack/cli: 1.6.0 => 1.6.0
  @rspack/core: 1.6.0 => 1.6.0
  @rspack/dev-server: 1.1.4 => 1.1.4
  @rspack/plugin-react-refresh: 1.5.2 => 1.5.2

Details

When upgrading from 1.5.8 to 1.6.0, the error I get is the following:

 "Uncaught SyntaxError: Invalid or unexpected token (at main.js:9:6)

When examining the main.js file, there appears to be nothing in it.

When I change the version of rspack core and cli back to 1.5.8, I see the compilation works, the rspack dev server loads, and the web page loads correctly.

For version 1.6.0, running the profiler shows that the compilation process is working. Comparing it to version 1.5.8, I do see a difference in the overall profile trace size, 276MB for v1.6.0 and 278 MB for v1.5.8. When viewing the profiles, they look about the same.

Reproduce link

No response

Reproduce Steps

  1. Upgrade @rspack/core and @rspack/cli to 1.6.0
  2. Run the dev server or a build
  3. See an error in the browser console, "Uncaught SyntaxError"

rudolfolah avatar Nov 03 '25 21:11 rudolfolah

Please give use a repro

JSerFeng avatar Nov 04 '25 02:11 JSerFeng

Hello @rudolfolah, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

github-actions[bot] avatar Nov 04 '25 02:11 github-actions[bot]