Skip to content

fix(legacy): respect quoted link attribute values - #23844

Open
leracherry wants to merge 1 commit into
vitejs:mainfrom
leracherry:fix/legacy-modulepreload-quoted-attributes
Open

leracherry wants to merge 1 commit into
vitejs:mainfrom
leracherry:fix/legacy-modulepreload-quoted-attributes

Conversation

@leracherry

@leracherry leracherry commented Oct 20, 2026 •

Copy link
Copy Markdown

In a legacy-only build, a stylesheet link can be removed if its title contains text like rel="modulepreload". A > inside a quoted value can also end the match too early.

Keep quoted attribute values together when matching modulepreload links. The browser regression checks that the stylesheet is preserved and still applies.

Follow-up to #22332. Refs #22320.

Rebased onto db8b119. The build, 19 plugin-legacy unit tests, and 4 focused browser tests passed locally. The previous CI run passed on Linux, macOS, and Windows.

@leracherry
leracherry force-pushed the fix/legacy-modulepreload-quoted-attributes branch 2 times, most recently from 08a2603 to 5ac5351 Compare October 20, 2026 16:50
@leracherry

leracherry commented Oct 26, 2026 •

Copy link
Copy Markdown
Author

Could a maintainer review this plugin-legacy fix? CI passed on the current head, and the PR includes unit and browser regressions for quoted link attributes. Please let me know if any changes are needed.

@leracherry
leracherry force-pushed the fix/legacy-modulepreload-quoted-attributes branch from 1b3f14c to 0bd4331 Compare November 9, 2026 19:56
@leracherry

Copy link
Copy Markdown
Author

Could a maintainer rerun the failed Node 22 job and review this fix? The current branch is conflict-free. The latest CI failure is in the existing HMR test "should hmr when file is deleted and restored" (expected parent:child, received parent:not-child), outside this PR’s changed files. The other build/test matrix jobs and lint passed. I attempted a rerun but GitHub requires repository admin rights: https://github.com/vitejs/vite/actions/runs/42688154498/job/129400547466

This branch has not been deployed

No deployments
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.

1 participant