Closed gabrielgrant closed 3 years ago
It's explained in the FastBoot section. Let me know if something's not clear.
Ah, ok -- so the reason we're adding it to the ember-cli-build.js
is so that the browser version doesn't get included in the Fastboot build (and then we add the node/Fastboot-specific version via the initializer to be included when run under Fastboot)?
Ah, ok -- so the reason we're adding it to the
ember-cli-build.js
is so that the browser version doesn't get included in the Fastboot build (and then we add the node/Fastboot-specific version via the initializer to be included when run under Fastboot)?
It's still included in the FastBoot build but is wrapped in a condition preventing it to run if it detects that it's in a FastBoot environment.
And to add, ember-cloud-firestore-adapter does the importing for you already, which is why you don't need to do it yourself. You have to remember that this is just a barebones firebase service addon so you import what you use (similar to what the firestore adapter did).
Gotcha, that all makes sense. Thanks for clarifying -- was mostly just a bit surprised/confused when I realized I had commented out those imports and the app was still working fine
The README suggests adding imports to
ember-cli-build.js
:But (at least when used with ember-cloud-firestore-adapter) this doesn't actually seem to be required. Is that expected? I have a far-from-perfect understanding of exactly how the whole ember build/import resolution pipeline works, so apologies if these are silly questions, but what are the circumstances when adding this is/isn't needed?