-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(builder): assetsRetry should work when htmlPlugin.inject false #4600
Conversation
🦋 Changeset detectedLatest commit: 8c0360f The changes in this PR will be included in the next version bump. This PR includes changesets to release 252 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4600 +/- ##
==========================================
- Coverage 57.59% 54.06% -3.54%
==========================================
Files 672 652 -20
Lines 17794 17902 +108
Branches 3876 4128 +252
==========================================
- Hits 10249 9679 -570
- Misses 6934 7571 +637
- Partials 611 652 +41 ☔ View full report in Codecov by Sentry. |
packages/document/builder-doc/docs/zh/config/output/assetsRetry.md
Outdated
Show resolved
Hide resolved
…y.md Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
Summary
🤖 Generated by Copilot at 07ba38c
This pull request fixes the issue that the assets retry feature does not work when the
htmlPlugin.inject
option is false. It preserves therel
andas
attributes for the<link>
tags when retrying assets, uses thealterAssetTagGroups
hook to inject the assets retry script, and updates the documentation and tests accordingly.Details
🤖 Generated by Copilot at 07ba38c
@modern-js/builder-shared
package (link)alterAssetTagGroups
hook instead of theafterTemplateExecution
hook to inject the assets retry script inAssetsRetryPlugin.ts
(link)rel
andas
attributes from the original<link>
tag to the new<link>
tag when creating the element for retrying inassetsRetry.ts
(link)rel
andas
attributes in the string representation of the new<link>
tag when creating the element for retrying inassetsRetry.ts
(link)assetsRetry.js
file to reflect the changes inassetsRetry.ts
(link)assetsRetry.md
(link, link)index.test.ts
that checks the order of the assets retry script, the convert to rem script, the normal resource script, and the template custom resource script in the output HTML file (link)index.js
that imports a CSS file and logs a message to the console (link)index.css
to be imported by the test entry file (link)index.html
that has a custom script tag and placeholders for the head and body tags (link)Related Issue
Checklist
pnpm run change
.