Skip to content

feat(html): support rollup 5 - #2038

Open
lukastaegert wants to merge 2 commits into
masterfrom
html-rollup-5
Open

lukastaegert wants to merge 2 commits into
masterfrom
html-rollup-5

Conversation

@lukastaegert

@lukastaegert lukastaegert commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Rollup Plugin Name: html

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes
  • no

Breaking Changes?

  • yes
  • no

List any relevant issue numbers:

Description

In #2035, I found out that the html plugin does not actually work with its minimally declared rollup version 1.20.0 as it relies on the type property introduced in 1.21.0. At the same time, no additional changes are needed to support rollup 5.

This PR adjusts both in a way that mirrors #2037.

Test against rollup@5.0.0-2 through the rollup-next catalog. The dynamic-import fixture now uses a side-effectful riddler.js module so a separate chunk is emitted and the entry-only script filtering stays covered. This matches the change in #2035.

To test plugins against the upcoming Rollup 5 release.
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Reviews (2) · Last reviewed commit: "feat(html): support rollup 5" · Reviewed by Greptile

Comment thread packages/html/package.json Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Rollup 5 requires Node >=22.22.0, but both CI workflows still use Node 20, leaving build and pretest jobs on an unsupported runtime.

1 open issue
1 file not reviewed
  • pnpm-lock.yaml: Generated file
What changed in this PR

Prepares @rollup/plugin-html for Rollup 5 without changing plugin implementation, and corrects its declared minimum Rollup version to 1.21.0, as identified in #2035.

Changes:

  • Extends peer support to Rollup 5 and selects its prerelease through the rollup-next catalog.
  • Adds a side-effectful dynamic-import fixture to preserve entry-only script filtering coverage.
  • Updates snapshots for the fixture and Rollup 5 warning output, and removes the old AVA snapshot report.
File Description
pnpm-workspace.yaml Adds the rollup-next catalog.
pnpm-lock.yaml Locks Rollup 5 and its dependencies for HTML plugin development.
packages/​html/​test/​snapshots/​test.js.snap Updates dynamic chunk and warning expectations.
packages/​html/​test/​snapshots/​test.js.md Removes the old AVA snapshot report.
packages/​html/​test/​fixtures/​riddler.js Adds a side-effectful module to retain a separate chunk.
packages/​html/​test/​fixtures/​catwoman.js Dynamically imports the new fixture.
packages/​html/​package.json Corrects the peer minimum, adds Rollup 5 support, and switches the development dependency.

Review effort: Balanced

"@rollup/plugin-typescript": "^9.0.1",
"postcss": "^8.4.16",
"rollup": "^4.0.0-24",
"rollup": "catalog:rollup-next",
Raise the declared peer floor to 1.21.0, the first Rollup version that adds the bundle file type property used to detect entry chunks, and extend the range to Rollup 5.

Extend the dynamic-import fixture so a separate chunk is emitted and the entry-only HTML script filtering stays covered. Drop the stale markdown snapshot copy.
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