feat: add webpack unbundled type sync script#4459
feat: add webpack unbundled type sync script#4459ScriptedAlchemy wants to merge 13 commits intomainfrom
Conversation
Co-authored-by: zackary.l.jackson <zackary.l.jackson@gmail.com>
Co-authored-by: zackary.l.jackson <zackary.l.jackson@gmail.com>
Co-authored-by: zackary.l.jackson <zackary.l.jackson@gmail.com>
|
Cursor Agent can help with this pull request. Just |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/data-prefetch
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/modern-js-v3
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Bundle Size Report4 package(s) changed, 37 unchanged.
Total dist: 6.89 MB (+4.0 kB (+0.1%)) |
packages/nextjs-mf/src/plugins/NextFederationPlugin/apply-server-plugins.ts
Outdated
Show resolved
Hide resolved
packages/nextjs-mf/src/plugins/NextFederationPlugin/apply-server-plugins.ts
Outdated
Show resolved
Hide resolved
…n-and-regeneration-from-webpack-d410
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51e1854107
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Description
This PR introduces a new script,
scripts/sync-webpack-unbundled-types.mjs, to automate the regeneration of comprehensive, unbundled TypeScript declaration files for the localwebpack/package.The primary motivation is to address the "inaccessible types" issue where webpack's default public type output lacks full coverage for internal modules. The script achieves this by:
.d.tsemit pass to capture a broader set of unbundled declarations from webpack's source (lib/**,hot/**,bin/**).webpack/directory, while preservingpackage.jsonand excluding test-related declarations.This ensures that the local
webpack/package provides a complete and up-to-date unbundled type definition, improving developer experience and type safety.The script is invoked via a single pnpm command:
pnpm run sync:webpack:types [--version <tag/commit>]. It has been verified to successfully regenerate 662 unique declaration paths and passpnpm buildafterward.Related Issue
N/A
Types of changes
Checklist