Skip to content

[Bug]: webpackPrefetch magic comment caused invalid requests since v1.5.0-beta.0 #12227

@chenjiahan

Description

@chenjiahan

System Info

@rspack/core v1.5.0-beta.0

Details

Prerequisites:

  • Using /* webpackPrefetch: true */ in source code
  • Enabled optimization.runtimeChunk

Result: Rspack sends an invalid prefetch request:

Image

It appears that the webpack/runtime/chunk_prefetch_startup module was split into runtime.js, which caused this issue (starting from Rspack 1.5.0-beta.0).

Reproduce link

https://github.com/chenjiahan/rspack-repro-prefetch-invalid-request

Reproduce Steps

  1. pnpm i
  2. pnpm build
  3. pnpm preview
  4. visit the page, check the console

Metadata

Metadata

Assignees

Labels

teamThe issue/pr is created by the member of Rspack.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions