-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ember-fetch fastboot passthrough #6011
Conversation
@@ -69,6 +70,19 @@ module.exports = { | |||
return path.join(__dirname, 'blueprints'); | |||
}, | |||
|
|||
updateFastBootManifest(manifest) { | |||
manifest.vendorFiles.push('ember-data/fetch-fastboot.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could lookup the ember-fetch addon and manually call updateFastBootManifest
ourselves to be safer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, but this is slightly different. This PR is intentionally avoiding/working around the guard added by ember-cli/ember-fetch#167 (which prevented the treeForPublic
from returning anything when ember-fetch
was not a top level addon).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue and I've also named this ember-data/fetch-fastboot.js
instead of ember-fetch/fetch-fastboot.js
like it would have been 🤔 I guess I could have done that but I was trying to avoid any name clashes. I don't know which way is better, I just went with my gut
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good for now, and we should land for release.
Follow up work:
- Update ember-fetch to work more appropriately here (specifically the
treeForPublic
) - Update ember-cli-fastboot to invoke the
updateFastbootManifest
hook recursively (instead of top-level only)
This will need ported to |
This is an attempt to fix the issue with fastboot on newly generated ember apps on version 3.9.0
We have discussed this solution at length in the #fastboot channel on the Ember Community Discord and this was one of the quicker ways to fix the issue and the one that required the least amount of up-front work.
Essentially the problem arises from the fact that ember-cli-fastboot should be walking the tree of addons and finding all addons that add things to the manifest using
updateFastBootManifest()
but it currently does not 😞As ember-data has now added ember-fetch as a dependency, we need to include the manifest information from ember-fetch for any app that uses ember-data to be able to use fastboot.
If my explanation of this doesn't seem right please feel free to correct me 😂
Fixes #5998
Fixes ember-fastboot/ember-cli-fastboot#682