-
Notifications
You must be signed in to change notification settings - Fork 160
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(plugin/assets-retry): addQuery and switchDomain should work in async css chunk #4315
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
(originSource) => | ||
originSource.replace( | ||
'var fullhref = __webpack_require__.p + href;', | ||
'var fullhref = __webpack_require__.rsbuildLoadStyleSheet ? __webpack_require__.rsbuildLoadStyleSheet(href, chunkId) : (__webpack_require__.p + href);', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be an unsafe replacement, if the source code has changed, this replacement may not work or may break the original code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no better solution at present, it is a part of ancient runtime code from mini-css,
if changed in rspack, eco-ci would take effect for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JSerFeng cc, can you offer some advice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature relies on css-extract, so it meets expectations and will have a higher dependence on css-extract, even if I don't use the replace method, any changes to css-extract runtime will have an influence to assets-retry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's keep track of the impact of runtime code changes through our ecosystem-ci.
Summary
fix
When I implemented this plugin, rsbuild was just switched from
experiment.css
tocssExtractPlugin
experimentally, I didn't know much about cssExtract.after this change, it means that
plugin-assets-retry
can only be used together withrspack.CssExtractPlugin
and MiniCssExtractPlugin in webpack😂 by the way, it was also not implemented in "eden"
Related Links
close #4306
Checklist