Skip to content

fix(rspack): refresh http import lockfile redirect - #503

Merged
SoonIter merged 1 commit into
mainfrom
fix-http-cache
Sep 14, 2026
Merged

SoonIter merged 1 commit into
mainfrom
fix-http-cache

Conversation

@SyMind

@SyMind SyMind commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What changed

Regenerate the http-import lockfile as a single redirect-aware entry:

  • https://www.unpkg.com/the-answer now records resolved as the final URL
    https://www.unpkg.com/the-answer@1.0.0/dist/the-answer.js after following
    the unpkg 301 redirect.
  • The redundant separate entry for the final URL is removed; the original
    URL's entry is authoritative.
  • integrity and content_type are unchanged (the content is identical);
    valid_until is refreshed from the re-fetch.

Why

Follow-up to #502. That PR repaired the frozen lockfile check but kept the
legacy two-entry shape written by the pre-fix Rspack. Since
Rspack #15609, the
HttpUriPlugin preserves the original URL's locked entry through redirects and
records the final resolved URL on it, so a clean regeneration with
frozen: false produces a single entry. This keeps the production build
passing with experiments.buildHttp.frozen enabled by default.

Validation

  • pnpm install --filter @rspack-example/http-import... --frozen-lockfile
  • pnpm --filter @rspack-example/http-import build (production mode, frozen lockfile enforced)

Related

@SoonIter
SoonIter merged commit bb56158 into main Sep 14, 2026
1 check passed
@SoonIter
SoonIter deleted the fix-http-cache branch September 14, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants