You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The published ember-source package contains two different builds of Ember. This RFC deprecates the older one.
36
+
The published `ember-source` package contains several AMD-specific bundled builds
37
+
of Ember that are appended to `vendor.js` in the classic build system.
38
+
This RFC deprecates the following files:
39
+
40
+
-`ember.debug.js`
41
+
-`ember.prod.js`
42
+
-`ember-testing.js`
43
+
-`ember-template-compiler.js`
44
+
45
+
Instead, Ember will be included in application builds as ES module library via `ember-auto-import`.
37
46
38
47
## Motivation
39
48
40
-
We don't want to to forever maintain the legacy, AMD-specific bundled copies of Ember that ember-cli traditionally appends to vendor.js. Instead, we want everybody consuming Ember as a modern ES module library.
49
+
Maintaining the legacy AMD-specific bundled copies of Ember is no longer necessary.
50
+
Modern Ember applications should consume Ember as ES modules, which aligns with
51
+
the broader JavaScript ecosystem. This change simplifies the build pipeline and
52
+
reduces maintenance overhead.
41
53
42
-
## Detailed design
54
+
This deprecation will have no effect on applications using Embroider with
55
+
`staticEmberSource: true` or Embroider v4 (Vite). It only impacts applications
56
+
using the classic build system without Embroider.
57
+
58
+
## Transition Path
43
59
44
60
> This is the bulk of the RFC.
45
61
@@ -63,6 +79,19 @@ We don't want to to forever maintain the legacy, AMD-specific bundled copies of
63
79
- Introduce an optional feature that opts into the new behavior (this is not hard to implement, it's mostly just disabling some existing compat code)
64
80
- Deprecate not enabling the optional feature
65
81
82
+
### Classic Build System
83
+
84
+
We will introduce a new optional feature for projects to opt into consuming
85
+
Ember as ES modules. Not having this optional feature enabled will result in
86
+
a deprecation warning.
87
+
88
+
Addons that rely on accessing Ember from `treeForVendor` or on accessing Ember
89
+
from vendor will need to update their implementation.
90
+
91
+
### Embroider v4 or with `staticEmberSource: true`
92
+
93
+
This deprecation will have no effect on these projects. They already consume Ember as ES modules.
94
+
66
95
## How we teach this
67
96
68
97
> What names and terminology work best for these concepts and why? How is this
@@ -78,8 +107,35 @@ We don't want to to forever maintain the legacy, AMD-specific bundled copies of
78
107
79
108
> Keep in mind the variety of learning materials: API docs, guides, blog posts, tutorials, etc.
80
109
81
-
- Need to explain what addon authors should do if they were accessing Ember from code in treeForVendor.
82
-
- Explain that this whole thing is a no-op for Embroider users with `staticEmberSource:true` or `@embroider/core >= 4.0`.
110
+
### Deprecation Guide
111
+
112
+
Ember will no longer publish legacy AMD-specific Ember builds. To opt-in to
113
+
consuming Ember as ES modules and clear this deprecation, enable the
114
+
`ember-modules` optional feature by running `ember feature:enable ember-modules`.
115
+
116
+
This applies only to the classic build system or to Embroider < 4.0 without the
117
+
`staticEmberSource: true` option. If you see this deprecation warning in these
118
+
setups, please [open an issue](https://github.com/emberjs/ember.js/issues/new/choose).
119
+
120
+
Alternatively, you can also clear the deprecation by moving to Embroider v4 by
121
+
running the [Ember Vite Codemod](https://github.com/mainmatter/ember-vite-codemod),
122
+
but this may require additional changes to your project.
123
+
124
+
The AMD-specific Ember builds will no longer be published in next Ember major release
125
+
and no longer be bundled into `vendor.js`, even on the classic build system. These files are:
126
+
-
127
+
-`ember.debug.js`
128
+
-`ember.prod.js`
129
+
-`ember-testing.js`
130
+
-`ember-template-compiler.js`
131
+
132
+
- In rare cases, Addons were relying on accessing Ember from `vendor`. If you have
133
+
addons that do so they will need to be updated to consume Ember as ES modules.
134
+
135
+
A known addon that previously relied on accessing Ember from `vendor` is
0 commit comments