Skip to content

Refactor so that small apps don't pull in the old renderer as well as some classic things#21462

Open
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/cleanup-3
Open

Refactor so that small apps don't pull in the old renderer as well as some classic things#21462
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/cleanup-3

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Still exploring ways to hint to bundlers that they can remove unused things

@NullVoxPopuli NullVoxPopuli changed the title Some refactoring Some /* @__PURE__ */ decoration Jun 11, 2026
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   0.2%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/@ember/application/instance.js 15 kB / 4.2 kB 6%↑15.9 kB / 7%↑4.4 kB
./packages/@ember/component/helper.js 84 B / 88 B 13,000%↑11 kB / 3,820%↑3.4 kB
./packages/shared-chunks/api-{hash}.js 10.1 kB / 2.3 kB 157%↑25.9 kB / 153%↑5.7 kB
./packages/shared-chunks/curly-brand-B_F79Dep.js 459 B / 220 B
./packages/shared-chunks/helper-{hash}.js 11.2 kB / 3.5 kB -95.7%↓487 B / -92.8%↓252 B
./packages/shared-chunks/index-{hash}.js 78.1 kB / 19.1 kB -19.9%↓62.6 kB / -34.3%↓12.5 kB
./packages/shared-chunks/outlet-CHFL7tun.js 4.2 kB / 1.4 kB
./packages/shared-chunks/setup-{hash}.js 2.8 kB / 906 B 1,060%↑32.2 kB / 841%↑8.5 kB
./packages/shared-chunks/template-{hash}.js 1.1 kB / 401 B -54%↓491 B / -49.4%↓203 B
Total (Includes all files) 2.1 MB / 492.8 kB 0.2%↑2.1 MB / 0.6%↑495.7 kB

dist/prod   0.2%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/@ember/application/instance.js 14.2 kB / 4 kB 5%↑14.9 kB / 5%↑4.2 kB
./packages/@ember/component/helper.js 84 B / 85 B 12,200%↑10.3 kB / 3,810%↑3.3 kB
./packages/shared-chunks/curly-brand-B_F79Dep.js 459 B / 220 B
./packages/shared-chunks/helper-{hash}.js 10.5 kB / 3.4 kB -95.4%↓487 B / -92.5%↓252 B
./packages/shared-chunks/index-{hash}.js 66.1 kB / 16.3 kB -9.49%↓59.8 kB / -25.8%↓12.1 kB
./packages/shared-chunks/outlet--lIm3q7t.js 3.9 kB / 1.3 kB
./packages/shared-chunks/setup-{hash}.js 2.6 kB / 858 B 977%↑27.8 kB / 765%↑7.4 kB
Total (Includes all files) 1.9 MB / 450.7 kB 0.2%↑1.9 MB / 0.5%↑453 kB

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

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 312.9 kB / 83.8 kB 0.04%↑313.1 kB / 0.08%↑83.9 kB
Total (Includes all files) 348.5 kB / 94.8 kB 0.04%↑348.7 kB / 0.1%↑94.9 kB

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

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 159 kB / 43.7 kB -4.07%↓152.5 kB / -3.46%↓42.2 kB
Total (Includes all files) 159.3 kB / 43.8 kB -4.06%↓152.9 kB / -3.43%↓42.3 kB

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

@NullVoxPopuli NullVoxPopuli changed the title Some /* @__PURE__ */ decoration Refactor so that small apps don't pull in the old renderer as well as some classic things Jun 11, 2026
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/cleanup-3 branch 2 times, most recently from b4cf812 to 5d75be0 Compare June 24, 2026 14:56
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review June 24, 2026 15:59
hash,
'unique-id': uniqueId,
};

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.

two branches with the same code

// class; deriving it from the definition (rather than importing it from
// the module that defines `Helper`) keeps this module from pulling in
// the classic object model when no classic helpers are in use.
let manager = getInternalHelperManager(definition);

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.

I think this is safe because of the isClassicHelper check above

}

lookupBuiltInHelper(name: string): HelperDefinitionState | null {
assert(

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.

not sure how I feel about this -- -prefixed things are private.

at the same time, we do eventually want to enable routing things for folks using renderComponent, but we only want that stuff to become available when importing router stuff

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.

direct extraction from renderer.ts

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.

@NullVoxPopuli NullVoxPopuli requested a review from ef4 June 26, 2026 04:25
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