Skip to content

Conversation

@ef4
Copy link
Contributor

@ef4 ef4 commented Nov 18, 2025

This is for RFC 1101, which would deprecate consuming ember via the AMD bundles.

This PR is creating an optional feature that makes classic builds consume ember the same way Embroider does (using dist/packages instead of dist/ember.debug.js, etc).

TODOs:

  • we should add v2 addon meta 'implicit-modules' support to ember-auto-import Implicit modules support embroider-build/ember-auto-import#677
  • and use implicit-modules in the new branch within autoImportMeta to eagerly register all the modules that were in the amd-compat-entrypoint.
  • this points at an alpha release of @ember/optional-features that defines the new flag
  • some of the names listed in the amd-compat-entrypoints are not actually available in the lose modules (they're currently commented out). Is this OK?
    • these turned out to be type-only modules that never had any runtime implementation in them anyway.
  • make our smoke tests exercise both flag off and flag on

This drops support for Node < 20.19, following Ember's node support policy.

This is work-in-progress for RFC 1101, which would deprecate consuming ember via the AMD bundles.

This PR is creating an optional feature that makes classic builds consume ember the same way Embroider does (using `dist/packages` instead of `dist/ember.debug.js`, etc).

TODOs:
 - we should add v2 addon meta 'implicit-modules' support to ember-auto-import
 - and use implicit-modules in the new branch within autoImportMeta to eagerly register all the modules that were in the amd-compat-entrypoint.
@ef4 ef4 marked this pull request as draft November 18, 2025 20:18
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

Estimated Asset Sizes

Diff

--- main/out.txt	2025-11-21 02:57:30.000000000 +0000
+++ pr/./pr-19681310450/out.txt	2025-11-25 19:17:10.000000000 +0000
@@ -1,36 +1,36 @@
 ╔═══════╤═══════════╤═══════════╗
 ║       │ Min       │ Gzip      ║
 ╟───────┼───────────┼───────────╢
-║ Total │ 417.63 KB │ 231.62 KB ║
+║ Total │ 416.72 KB │ 230.96 KB ║
 ╚═══════╧═══════════╧═══════════╝
 
 ╔══════════════════════╤═══════════╤═══════════╗
 ║ @ember/*             │ Min       │ Gzip      ║
 ╟──────────────────────┼───────────┼───────────╢
-║ Total                │ 238.38 KB │ 146.63 KB ║
+║ Total                │ 237.99 KB │ 146.49 KB ║
 ╟──────────────────────┼───────────┼───────────╢
-║ -internals           │ 34.55 KB  │ 24.84 KB  ║
-║ application          │ 12.71 KB  │ 7.73 KB   ║
-║ array                │ 12.66 KB  │ 7.32 KB   ║
+║ -internals           │ 34.52 KB  │ 24.88 KB  ║
+║ application          │ 12.7 KB   │ 7.6 KB    ║
+║ array                │ 12.63 KB  │ 7.3 KB    ║
 ║ canary-features      │ 304 B     │ 419 B     ║
 ║ component            │ 1.07 KB   │ 1005 B    ║
 ║ controller           │ 1.8 KB    │ 1.36 KB   ║
-║ debug                │ 11.4 KB   │ 7.92 KB   ║
+║ debug                │ 11.36 KB  │ 7.92 KB   ║
 ║ deprecated-features  │ 31 B      │ 77 B      ║
 ║ destroyable          │ 561 B     │ 383 B     ║
 ║ enumerable           │ 259 B     │ 387 B     ║
 ║ helper               │ 823 B     │ 599 B     ║
-║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
+║ instrumentation      │ 2.43 KB   │ 1.77 KB   ║
 ║ modifier             │ 669 B     │ 586 B     ║
-║ object               │ 33.78 KB  │ 20.79 KB  ║
+║ object               │ 33.74 KB  │ 20.66 KB  ║
 ║ owner                │ 159 B     │ 178 B     ║
 ║ renderer             │ 406 B     │ 353 B     ║
-║ routing              │ 58.08 KB  │ 33.43 KB  ║
+║ routing              │ 58.04 KB  │ 33.41 KB  ║
 ║ runloop              │ 2.2 KB    │ 1.33 KB   ║
 ║ service              │ 859 B     │ 741 B     ║
 ║ template             │ 430 B     │ 370 B     ║
 ║ template-compilation │ 429 B     │ 366 B     ║
-║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
+║ template-compiler    │ 57.71 KB  │ 30.53 KB  ║
 ║ template-factory     │ 94 B      │ 160 B     ║
 ║ test                 │ 923 B     │ 627 B     ║
 ║ utils                │ 3.93 KB   │ 3.5 KB    ║
@@ -40,22 +40,22 @@
 ╔═════════════════╤═══════════╤══════════╗
 ║ @glimmer/*      │ Min       │ Gzip     ║
 ╟─────────────────┼───────────┼──────────╢
-║ Total           │ 179.25 KB │ 84.99 KB ║
+║ Total           │ 178.73 KB │ 84.47 KB ║
 ╟─────────────────┼───────────┼──────────╢
-║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
+║ destroyable     │ 2.69 KB   │ 1.3 KB   ║
 ║ encoder         │ 596 B     │ 653 B    ║
 ║ env             │ 38 B      │ 87 B     ║
 ║ global-context  │ 886 B     │ 545 B    ║
-║ manager         │ 12.19 KB  │ 5.44 KB  ║
+║ manager         │ 12.17 KB  │ 5.42 KB  ║
 ║ node            │ 2.71 KB   │ 1.81 KB  ║
-║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
+║ opcode-compiler │ 29.72 KB  │ 13.19 KB ║
 ║ owner           │ 159 B     │ 202 B    ║
-║ program         │ 7.1 KB    │ 3.63 KB  ║
-║ reference       │ 5.51 KB   │ 3.18 KB  ║
-║ runtime         │ 95.26 KB  │ 42.69 KB ║
+║ program         │ 7.1 KB    │ 3.62 KB  ║
+║ reference       │ 5.49 KB   │ 3.21 KB  ║
+║ runtime         │ 94.98 KB  │ 42.28 KB ║
 ║ tracking        │ 989 B     │ 961 B    ║
 ║ util            │ 3.03 KB   │ 2.29 KB  ║
-║ validator       │ 15.64 KB  │ 6.86 KB  ║
+║ validator       │ 15.63 KB  │ 6.83 KB  ║
 ║ vm              │ 784 B     │ 798 B    ║
 ║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
 ╚═════════════════╧═══════════╧══════════╝

Details

This PRmain
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 416.72 KB │ 230.96 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 237.99 KB │ 146.49 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 34.52 KB  │ 24.88 KB  ║
║ application          │ 12.7 KB   │ 7.6 KB    ║
║ array                │ 12.63 KB  │ 7.3 KB    ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 1.07 KB   │ 1005 B    ║
║ controller           │ 1.8 KB    │ 1.36 KB   ║
║ debug                │ 11.36 KB  │ 7.92 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 599 B     ║
║ instrumentation      │ 2.43 KB   │ 1.77 KB   ║
║ modifier             │ 669 B     │ 586 B     ║
║ object               │ 33.74 KB  │ 20.66 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 406 B     │ 353 B     ║
║ routing              │ 58.04 KB  │ 33.41 KB  ║
║ runloop              │ 2.2 KB    │ 1.33 KB   ║
║ service              │ 859 B     │ 741 B     ║
║ template             │ 430 B     │ 370 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.71 KB  │ 30.53 KB  ║
║ template-factory     │ 94 B      │ 160 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 3.93 KB   │ 3.5 KB    ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 178.73 KB │ 84.47 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.69 KB   │ 1.3 KB   ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.17 KB  │ 5.42 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.72 KB  │ 13.19 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.62 KB  ║
║ reference       │ 5.49 KB   │ 3.21 KB  ║
║ runtime         │ 94.98 KB  │ 42.28 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.63 KB  │ 6.83 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 417.63 KB │ 231.62 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 238.38 KB │ 146.63 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 34.55 KB  │ 24.84 KB  ║
║ application          │ 12.71 KB  │ 7.73 KB   ║
║ array                │ 12.66 KB  │ 7.32 KB   ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 1.07 KB   │ 1005 B    ║
║ controller           │ 1.8 KB    │ 1.36 KB   ║
║ debug                │ 11.4 KB   │ 7.92 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 599 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 669 B     │ 586 B     ║
║ object               │ 33.78 KB  │ 20.79 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 406 B     │ 353 B     ║
║ routing              │ 58.08 KB  │ 33.43 KB  ║
║ runloop              │ 2.2 KB    │ 1.33 KB   ║
║ service              │ 859 B     │ 741 B     ║
║ template             │ 430 B     │ 370 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
║ template-factory     │ 94 B      │ 160 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 3.93 KB   │ 3.5 KB    ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝

@ef4 ef4 force-pushed the use-ember-modules branch from 53613b1 to 2e7ee95 Compare November 19, 2025 23:11
@ef4 ef4 marked this pull request as ready for review November 25, 2025 19:34
@kategengler kategengler merged commit fd9a557 into main Nov 25, 2025
29 checks passed
@kategengler kategengler deleted the use-ember-modules branch November 25, 2025 19:37
ef4 added a commit that referenced this pull request Nov 25, 2025
#21009 added the optional feature to use ES modules instead of AMD bundles, this follows up by emitting a deprecation if you don't do that.
@ef4 ef4 mentioned this pull request Nov 25, 2025
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.

3 participants