Is is possible to use Embroider in an Ember app v3.16.2 ?
Offhand I’m not sure but my guess is that it would be fairly difficult. Not because Embroider requires a specific version per-se, but it comes down to what addons you have and what versions they are. A lot of addons now support only > 3.24 or 3.28, so finding a set of your addons which are both Embroider-ready but also still 3.16 compatible might be a challenge.
That said it’s theoretically possible, and you can always try it out and see how far you get. The fewer Ember addons you have, and the less custom build-related shenanigans you are doing, the easier it would probably be.
Embroider versions before 2.0 supported Ember 3.16. Starting at @embroider/core
2.0 the earliest supported Ember is 3.28.
Hello, I am using ember-cli version 2.16.2 and ember-source version 3.4.8. Is Embroider compatible with these versions?
No, you will need at least ember-source 3.28 to use current releases of embroider.
As for ember-cli 2.16, I don’t really know where the hard limit is for old ember-cli versions but we actively test the versions that match the ember-source version (so when we test ember-source 3.28.x we also test ember-cli 3.28.x)
Thanks! Let’s say I upgrade to Ember v3.28, can I use Embroider while still retaining my Classic components and pod structure?
Yes, classic components (meaning extends @ember/component
instead of @glimmer/component
) and pods are supposed to work. This is all for current stable releases of embroider, using @embroider/core
3.x.
Hello! So, I just upgraded my app to ember-source 3.28, and also included embroider in my app. I toggled the splitAtRoutes and staticComponents flags to true, and came across one issue.
If a pod structured component, is used specifically by just one specific route, it is still being included in the main chunk, instead of the route’s chunk. However, if I change the component to classic structured component, it is getting bundled correctly, with the route’s chunk. (I have set the appropriate pod prefix using the podModulePrefix in my environment.js file)
I do realize that pods structure of components has been officially deprecated by ember.js. But could you please confirm, if pod components do not work well with staticComponents mode, and that I have no other option other than to move to classic or colocated structure for my components?
There is some support for pods in embroider but you’re correct that making it 100% compatible with the old pods is not on anybody’s current priorities.
move to classic or colocated structure for my components?
Non-colocated component templates (app/templates/components/thing.hbs
and app/components/thing.js
) are deprecated at ember 5.10 and removed at 6.0. So colocated (app/components/thing.{js,hbs}
) is the way to go. Also, from colocated you can use template-tag-code to get to template tag (gjs), and that gives you the freedom to organize your components in a pods-like way if you want to. Template Tag works on versions all the way back to 3.27 via the ember-template-imports addon.