Skip to content

Tell rollup to cleanup the dev/prod spit from @glimmer/debug#21386

Merged
NullVoxPopuli merged 3 commits into
mainfrom
nvp/tell-rollup-to-tree-shake-the-debug-packages
May 11, 2026
Merged

Tell rollup to cleanup the dev/prod spit from @glimmer/debug#21386
NullVoxPopuli merged 3 commits into
mainfrom
nvp/tell-rollup-to-tree-shake-the-debug-packages

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   -1.2%↓

File Before (Size / Brotli) After (Size / Brotli)
./packages/@glimmer/opcode-compiler/index.js 1.3 kB / 426 B -12.3%↓1.1 kB / -13.2%↓370 B
./packages/@glimmer/runtime/index.js 2.2 kB / 777 B -4.92%↓2.1 kB / -4.5%↓742 B
./packages/shared-chunks/assert-{hash}.js 619 B / 299 B -85.3%↓91 B / -72.2%↓83 B
./packages/shared-chunks/curried-{hash}.js 19.9 kB / 4.9 kB -99.2%↓163 B / -98%↓97 B
./packages/shared-chunks/opcode-metadata-9iSW5JGP.js 10.7 kB / 2.6 kB
./packages/shared-chunks/syscall-ops-BPFtDquC.js 6.4 kB / 1.5 kB
./packages/shared-chunks/template-{hash}.js 491 B / 203 B 118%↑1.1 kB / 98%↑401 B
./packages/shared-chunks/vm-ops-ImHv0Wtg.js 445 B / 191 B
Total (Includes all files) 2 MB / 484.3 kB -1.2%↓2 MB / -1.27%↓478.1 kB

dist/prod   -1.47%↓

File Before (Size / Brotli) After (Size / Brotli)
./packages/@glimmer/opcode-compiler/index.js 1.3 kB / 425 B -12.3%↓1.1 kB / -14.4%↓364 B
./packages/@glimmer/runtime/index.js 2.2 kB / 767 B -5%↓2.1 kB / -3.91%↓737 B
./packages/shared-chunks/assert-{hash}.js 619 B / 299 B -85.3%↓91 B / -72.2%↓83 B
./packages/shared-chunks/curried-{hash}.js 19.9 kB / 4.9 kB -99.2%↓163 B / -98%↓97 B
./packages/shared-chunks/opcode-metadata-9iSW5JGP.js 10.7 kB / 2.6 kB
./packages/shared-chunks/syscall-ops-BPFtDquC.js 6.4 kB / 1.5 kB
./packages/shared-chunks/vm-ops-ImHv0Wtg.js 445 B / 191 B
Total (Includes all files) 1.8 MB / 443.6 kB -1.47%↓1.8 MB / -1.7%↓436.1 kB

smoke-tests/v2-app-hello-world-template/dist   -3.31%↓

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 242.7 kB / 66.5 kB -3.31%↓234.7 kB / -3.26%↓64.3 kB
Total (Includes all files) 243 kB / 66.6 kB -3.31%↓235 kB / -3.26%↓64.5 kB

🤖 This report was automatically generated by wyvox/pkg-size

let entries = getRenamedModules();
let result = await findShakenFiles(entries, prodResolve);

expect(result.shaken).toMatchInlineSnapshot(`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

declaring our low-level modules as shakable has a cascade of improvements (which we'll see the fruits of in a future PR)

@NullVoxPopuli NullVoxPopuli requested review from ef4 and kategengler May 8, 2026 05:01
@NullVoxPopuli
Copy link
Copy Markdown
Contributor Author

I'm seeing browserstack stuck across 5 separate PRs... so... I guess they did something over there...

@NullVoxPopuli NullVoxPopuli requested review from kategengler and removed request for kategengler May 8, 2026 22:05
Comment thread rollup.config.mjs
onLog: handleRollupWarnings,
input,
treeshake: {
moduleSideEffects(id) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like very few of our modules actually have side effects and wonder if we can't invert this and only list the things that do have side effects, rather than listing some things that don't.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, I'll experiment with that next -- would be good information to have ahead of #21365

the "side-effects tests" we have also flag rollup's "hoisted imports", which is kind of annoying, but something I also need to look in to

@NullVoxPopuli NullVoxPopuli merged commit b08e7fc into main May 11, 2026
72 of 73 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/tell-rollup-to-tree-shake-the-debug-packages branch May 11, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants