Hello, I have just started working on an Ember.js legacy application, and we are looking to improve the build and load time of the app. The environment that we are working on is:
ember-cli : v2.16.2
ember-source: v3.4.8
We use pods structure and Ember.js classic components
I just came across Embroider and the readme mentions that it is compatible with Ember.js v3.28 and higher. It looks like, if we upgrade our app to v3.28 it will help us use Embroider to reduce our load time (particularly the splitAtRoutes mode).
My transition plan is as follows:
- Upgrade to Ember3.28
- Start using Embroider
- Refactor few components to Angle bracket syntax - (All components cannot be refactored to use the Angle bracket syntax)
- Convert few classic components to glimmer components - (All components cannot be refactored as Glimmer components)
I currently have two queries:
-
We are planning to start step3 at a later point in time and there will be a significant gap of time between step 2 and 3, so can we upgrade to Ember.js 3.28 and leverage Embroider's capabilities, but still use Ember.js classic components and the pods structure, and then later continue from step3 in the plan?
-
Our app uses components helper to render dynamic components for a wide range of usecases, how does Embroider handle dynamic-components? I did see an option to use the ensure-safe-component helper, but I am still not sure what exactly it does. Does it exclude components that use the components helper from code-splitting, or is there some other way that it handles this case?
Apologies, if this is not the right place to post this, or if these doubts are extremely trivial, but I have just started working on ember.js and these queries are based on my current understanding of it. TIA!