-
Notifications
You must be signed in to change notification settings - Fork 355
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
feat(builder): add convertToRem.inlineRuntime config #3460
feat(builder): add convertToRem.inlineRuntime config #3460
Conversation
🦋 Changeset detectedLatest commit: e7be9b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 213 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:
Additional details and impacted files@@ Coverage Diff @@
## main #3460 +/- ##
==========================================
+ Coverage 57.59% 57.96% +0.36%
==========================================
Files 672 668 -4
Lines 17794 17732 -62
Branches 3876 3858 -18
==========================================
+ Hits 10249 10278 +29
+ Misses 6934 6847 -87
+ Partials 611 607 -4
... and 76 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Summary
🤖 Generated by Copilot at c41409d
This pull request adds a new feature to the
convertToRem
option of the@modern-js/builder-*
packages, which allows users to choose whether to inline or extract the runtime code that adjusts the root font size for responsive web design. It also refactors and improves the code quality and readability of the plugins that implement the feature, and updates the documentation and tests accordingly.Details
🤖 Generated by Copilot at c41409d
convertToRem.inlineRuntime
option to control whether the runtime code for theconvertToRem
feature is inlined or extracted (link,link,link,link,link,link)AssetsRetryPlugin
and theAutoSetRootFontSizePlugin
by extracting some utility functions to theutil.ts
file of the@modern-js/builder-shared
package (link,link,link,link,link,link,link,link,link)getDistPath
function to get the output directory for the runtime code in therem.ts
files of the@modern-js/builder-rspack-provider
and the@modern-js/builder-webpack-provider
packages (link,link,link,link,link,link)config
in thebuilderPluginRem
functions of therem.ts
files of the@modern-js/builder-rspack-provider
and the@modern-js/builder-webpack-provider
packages to avoid repeated calls and improve consistency (link,link)RemOptions
type in theoutput.ts
file of the@modern-js/builder-shared
package to explain some options (link)assets-retry
test case files tooutput/assets-retry
to match the output config category (link,link)Related Issue
Checklist
pnpm run change
.