fix(bridge): exclude __tests__ from published package#4674
fix(bridge): exclude __tests__ from published package#46742heal1 merged 3 commits intomodule-federation:mainfrom
Conversation
Add npm publish file lists for bridge packages to avoid shipping __tests__ and test fixtures.
|
✅ 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/esbuild
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/modern-js
@module-federation/modern-js-v3
@module-federation/native-federation-tests
@module-federation/native-federation-typescript
@module-federation/nextjs-mf
@module-federation/node
@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/storybook-addon
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/typescript
@module-federation/utilities
@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 Report10 package(s) changed, 30 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 6.32 MB (no change) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
| }, | ||
| "files": [ | ||
| "dist/", | ||
| "src/", |
There was a problem hiding this comment.
question: Sorry to bump in here like that but I have a quick question:
Why are you publishing the files under src as well as the transpiled files under dist?
Is there some additional benefit to doing that? You should be already generating declarations.
Is this only done to allow consumers to jump to the "real" source code while developing?
There was a problem hiding this comment.
Good catch! You are completely right.
To be honest, including src/ was a misjudgment made by the AI assistant I used to help configure this package. It's totally unnecessary since we already ship the compiled output and declarations in dist/.
I haven't merged this PR yet, so I will update it to remove src/ from the published files. Thanks for pointing it out!
Add npm publish file lists for bridge packages to avoid shipping tests and test fixtures.
Description
Related Issue
#4668
Types of changes
Checklist