test(e2e): enable native HTML implementation#6505
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR changes the default HTML plugin implementation from JavaScript-based ('js') to Rust-based native implementation ('native'). The native implementation produces HTML link tags with a different attribute ordering, placing the href attribute before the rel attribute. All test expectations have been updated to match this new attribute order.
Key Changes
- Changed default
html.implementationfrom'js'to'native'in the core configuration - Updated all HTML link tag assertions in e2e tests to expect the new attribute order (
hrefbeforerel)
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/src/defaultConfig.ts | Changed default HTML implementation from 'js' to 'native' |
| e2e/cases/html/favicon/index.test.ts | Updated test expectations for favicon link tags to match new attribute order |
| e2e/cases/html/app-icon/index.test.ts | Updated test expectations for app icon and manifest link tags to match new attribute order |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| outputStructure: 'flat', | ||
| scriptLoading: 'defer', | ||
| implementation: 'js', | ||
| implementation: 'native', |
There was a problem hiding this comment.
Changing the default from 'js' to 'native' is a significant breaking change that affects HTML output format. The documentation at line 1605 in types/config.ts states '@default 'js'' which should be updated to reflect this new default value of 'native'.

Summary
This PR is used to test the native HTML implementation, ensuring that all E2E cases can be passed.
Diff
Breaking changes
<%= process.env.ASSET_PREFIX %>is no longer supported, use<%= assetPrefix %>insteadNon-breaking changes
Checklist