Skip to content

[Bug]: [NetworkError]: Failed to execute 'importScripts' on 'WorkerGlobalScope' #12195

@kwonoj

Description

@kwonoj

System Info

System:
OS: macOS 26.1
CPU: (12) arm64 Apple M3 Pro
Memory: 9.12 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.19.0 - /Users/ohjoong.kwon/.proto/tools/node/20.19.0/bin/node
Yarn: 4.5.0 - /Users/ohjoong.kwon/.proto/shims/yarn
npm: 10.8.2 - /Users/ohjoong.kwon/.proto/tools/node/20.19.0/bin/npm
Browsers:
Chrome: 142.0.7444.135
Safari: 26.1
npmPackages:
@rspack/cli: ^1.6.3 => 1.6.3
@rspack/core: ^1.6.3 => 1.6.3
@rspack/plugin-react-refresh: ^1.5.3 => 1.5.3

Details

Another 1.5.8 -> 1.6.3 regression. On the prod build with 1.6.3, some of chunks in the worker failed to load with exceptino

[NetworkError]: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://xxxxxx.com/assets/app-26cdeb0/app-11141.629fb77f9626c90f.chunk.js' failed to load.

Peeking build output, I could see importScripts transform has slightly changed; but can't tell which part causes the issue

// 1.6.3
__webpack_require__.f.i = function (t, r) {
        e[t] ||
          /^(68(467|938)|(1315|4614|4901)5|50146|74429|8122|96762)$/.test(t) ||
          importScripts(__webpack_require__.p + __webpack_require__.u(t));
      };
// 1.5.8
var e = { 29706: 1 };
      i.f.i = function (t, n) {
        e[t] || importScripts(i.p + i.u(t));
      };

Reproduce link

No response

Reproduce Steps

I'm trying to find out reproducible cases, but it's extremely difficult to create an isolated one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions