Repository navigation
bundler(splitting): one edge rule for both walks; no chunk imports an unhashed entry #44023
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -3210,6 +3210,7 @@ declare module "bun" { | |||||||
| * that absorbs a folded chunk exports the symbols other chunks import | ||||||||
| * from it. Requires `splitting: true`. CLI: `--min-chunk-size`. For browser | ||||||||
| * builds, where every chunk is a request, 16384 is a good value. | ||||||||
| * Nothing folds into a `target: "browser"` entry point without `[hash]` in its name. | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '3192,3223p' packages/bun-types/bun.d.ts
sed -n '987,1012p' src/bundler/linker_context/mergeSmallChunks.rsRepository: oven-sh/bun Length of output: 3400 🏁 Script executed: printf '%s\n' '--- declaration context ---'
sed -n '3135,3220p' packages/bun-types/bun.d.ts
printf '%s\n' '--- relevant guide references ---'
rg -n -i -C 4 'min.?chunk|HTML.*entry|entry.*HTML|fold' docs packages src | head -240
printf '%s\n' '--- changed documentation diff ---'
git diff --unified=12 97246d044e1e6e7c570ed911bb6911ec068759e5 3aea1b8658e511488d4f3fa5a82ec75bb14531c7 -- packages/bun-types/bun.d.tsRepository: oven-sh/bun Length of output: 21006 🏁 Script executed: printf '%s\n' '--- pinning implementation and diff ---'
sed -n '930,1020p' src/bundler/linker_context/mergeSmallChunks.rs
git diff --unified=16 97246d044e1e6e7c570ed911bb6911ec068759e5 3aea1b8658e511488d4f3fa5a82ec75bb14531c7 -- src/bundler/linker_context/mergeSmallChunks.rs
printf '%s\n' '--- HTML loader and entry construction references ---'
rg -n -C 5 'Loader::Html|entry_source_indices|HTML entry|html entry|entrypoints that an HTML|HTML.*loads' src/bundler docs/bundler/index.mdx | head -320Repository: oven-sh/bun Length of output: 35670 Qualify the browser folding rule and shared-code example. With Suggested documentation update- * `import()`s lives in the entry point's chunk). This option additionally
+ * `import()`s can live in the entry point's chunk when that entry point
+ * is eligible for folding). This option additionally
...
- * Nothing folds into a `target: "browser"` entry point without `[hash]` in its name.
+ * An unhashed `target: "browser"` JavaScript entry point remains pinned.
+ * An HTML entry point is exempt from this URL-safety rule.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| * | ||||||||
| * @default 0 (disabled) | ||||||||
| */ | ||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.