Description
When running an Ember application in Node (such as through FastBoot), the asset-manifest
module blows up since it can't read from the DOM (which doesn't exist).
There are patterns to handle this, but it raises the overarching issue of how should lazy assets be handled within a non-browser environment.
Open questions:
- Should the Asset Manifest be present in Node? Or should it just be an empty config?
- If the manifest is present, what should the loader functions do?
- If the manifest is not present, what happens when a code path is hit that expects to load something?
My current thinking is:
In a Node process, all assets should be loaded upfront (need build targets in order to do this easily), but the manifest should still be present so that if a code path expects to load a bundle (or similar) it doesn't kill the app. This would mean that the loader functions should all return immediately resolving Promises (Promise.resolve()
).
@nathanhammond @dgeb @rwjblue would greatly appreciate hearing your thoughts on this
Tasks: