-
Notifications
You must be signed in to change notification settings - Fork 378
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(rspack-provider): support security.checkSyntax in Rspack #3685
Conversation
🦋 Changeset detectedLatest commit: a558145 The changes in this PR will be included in the next version bump. This PR includes changesets to release 208 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 #3685 +/- ##
==========================================
+ Coverage 57.59% 58.17% +0.57%
==========================================
Files 672 643 -29
Lines 17794 17190 -604
Branches 3876 3751 -125
==========================================
- Hits 10249 10000 -249
+ Misses 6934 6589 -345
+ Partials 611 601 -10 ☔ View full report in Codecov by Sentry. |
Summary
related issue: web-infra-dev/rspack#3147
related issue: #3634
🤖 Generated by Copilot at 9848c5c
This pull request refactors the
checkSyntax
plugin to make it reusable across different builder packages. It moves the plugin and its dependencies from@modern-js/builder-webpack-provider
to@modern-js/builder-shared
, and updates the imports and types accordingly. It also adds thecheckSyntax
option to the security config for Rspack, which is a tool for building React Server Components. The option allows users to enable or disable the syntax analysis feature for the output files.Details
🤖 Generated by Copilot at 9848c5c
checkSyntax
plugin to support syntax checking for React Server Components (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)checkSyntax
plugin frompackages/builder/builder-webpack-provider/src/webpackPlugins/CheckSyntaxPlugin
topackages/builder/builder-shared/src/plugins/CheckSyntaxPlugin
and update imports and types accordingly (link, link, link, link, link, link, link, link, link)checkSyntax
option to the default security config for Rspack inpackages/builder/builder-rspack-provider/src/config/defaults.ts
and apply the plugin to the default plugins for Rspack inpackages/builder/builder-rspack-provider/src/shared/plugin.ts
(link, link)packages/builder/builder-rspack-provider/src/types/config/security.ts
to import the shared security config from@modern-js/builder-shared
(link)checkSyntax
plugin to the@modern-js/builder-shared
package inpackages/builder/builder-shared/package.json
(link, link)apply
method of thecheckSyntax
plugin inpackages/builder/builder-shared/src/plugins/CheckSyntaxPlugin/index.ts
to make it compatible with both webpack and Rspack (link)checkSyntax
plugin from the@modern-js/builder-shared
package inpackages/builder/builder-shared/src/plugins/index.ts
(link)checkSyntax
to themockBuilderPlugins
helper function inpackages/builder/builder-shared/src/test-stub/helper.ts
(link)security
property of the shared normalized config type required inpackages/builder/builder-shared/src/types/config/index.ts
(link)checkSyntax
option inpackages/builder/builder-shared/src/types/config/security.ts
and add the option to the shared security config interface (link, link)checkSyntax
plugin to the plugins type inpackages/builder/builder-shared/src/types/plugin.ts
(link)checkSyntax
plugin from the@modern-js/builder-webpack-provider
package inpackages/builder/builder-webpack-provider/package.json
(link, link, link)Related Issue
Checklist
pnpm run change
.