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)

I don't think we have any side-effects, but here is a burn-down list of things to look at:


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

Other information

@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)
./packages/shared-chunks/template-{hash}.js 491 B / 203 B 118%↑1.1 kB / 98%↑401 B
Total (Includes all files) 2.1 MB / 495.8 kB 2.1 MB / 495.8 kB

dist/prod   No changes

File Before (Size / Brotli) After (Size / Brotli)
Total (Includes all files) 1.9 MB / 453.2 kB 1.9 MB / 453.2 kB

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

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 313.3 kB / 83.8 kB -1.89%↓307.3 kB / -1.77%↓82.3 kB
./assets/modules-{hash}.js 34.1 kB / 10.3 kB 18%↑40.3 kB / 17%↑12.1 kB
Total (Includes all files) 348.9 kB / 94.9 kB 0.09%↑349.2 kB / 0.3%↑95.1 kB

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

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 152.8 kB / 42.2 kB -13.4%↓132.2 kB / -12.6%↓36.9 kB
Total (Includes all files) 153.1 kB / 42.4 kB -13.4%↓132.5 kB / -12.6%↓37 kB

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

@NullVoxPopuli NullVoxPopuli force-pushed the nvp/sideEffects-false branch 2 times, most recently from 7b6b742 to 0747280 Compare June 10, 2026 17:59
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/sideEffects-false branch 2 times, most recently from 210acf1 to 629d04e Compare June 16, 2026 16:17
@NullVoxPopuli NullVoxPopuli changed the title sideEffects: false sideEffects: false (or as close as we can get) Jun 18, 2026
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/sideEffects-false branch from 629d04e to 5c56648 Compare July 2, 2026 15:20
@NullVoxPopuli NullVoxPopuli changed the title sideEffects: false (or as close as we can get) sideEffects: false Jul 2, 2026
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