Skip to content

sideEffects: false#21456

Open
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/sideEffects-false
Open

sideEffects: false#21456
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/sideEffects-false

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

declare all modules as not causing sideEffects that would cause other modules to break -- if it's imported (and most of our stuff is imported right now)

we technically don't have any. guarantees that this is safe without the plugin from:


Route is not present is the hello-world app


Where we started before other refactors landed:

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

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 234.9 kB / 64.3 kB -35.3%↓151.9 kB / -34.4%↓42.2 kB
Total (Includes all files) 235.2 kB / 64.5 kB -35.3%↓152.3 kB / -34.3%↓42.4 kB

setting sideEffects: false with no refactors takes the hello-world app from 64.5 kB to 42.4 kB

PRs that landed that bring this down from the initial 64.5 kB:

Note

Prior spikes with both sideEffects declaration and refactorings brought us down to ~30 kB

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   No changes

File Before (Size / Brotli) After (Size / Brotli)
Total (Includes all files) 2.1 MB / 491.9 kB 2.1 MB / 491.9 kB

dist/prod   No changes

File Before (Size / Brotli) After (Size / Brotli)
./packages/shared-chunks/api-{hash}.js 24.3 kB / 5.3 kB -65.7%↓8.3 kB / -66.9%↓1.8 kB
./packages/shared-chunks/cache-{hash}.js 9.9 kB / 2.8 kB -93%↓697 B / -90.8%↓258 B
Total (Includes all files) 1.9 MB / 450 kB 1.9 MB / 450 kB

smoke-tests/v2-app-template/dist   0.09%↑

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 312.4 kB / 83.6 kB -1.89%↓306.4 kB / -1.66%↓82.2 kB
./assets/modules-{hash}.js 33.9 kB / 10.2 kB 18%↑40.1 kB / 18%↑12 kB
Total (Includes all files) 347.8 kB / 94.5 kB 0.09%↑348.1 kB / 0.4%↑94.9 kB

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

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 158.7 kB / 43.6 kB -8.07%↓145.9 kB / -7.23%↓40.5 kB
Total (Includes all files) 159.1 kB / 43.8 kB -8.05%↓146.2 kB / -7.19%↓40.6 kB

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

@NullVoxPopuli NullVoxPopuli force-pushed the nvp/sideEffects-false branch from 0747280 to 210acf1 Compare June 11, 2026 17:52
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.

1 participant