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
Update for fastboot 1.0 #29
Update for fastboot 1.0 #29
Conversation
Hey Scott! I'll take a look at that error by end of day and let you know. |
index.js
Outdated
|
||
//add node version of fetch.js into fastboot package.json manifest vendorFiles array | ||
updateFastBootManifest: function(manifest) { | ||
var fastbootFetchPath = path.resolve(__dirname + '/assets/fastboot-fetch.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.
The reason you are seeing the error is because of this line. This will give you an absolute path. The fastboot manifest takes the relative path to the dist
or tmp
directory from it is going to serve the assets. The reason being it serves everything off a relative path that is given to it on boot.
Therefore, this asset needs to be part of the app build assets (ie in dist
).
My recommendation would be:
- Move the contents of
assets/fastboot-fetch.js
topublic/fastboot-fetch.js
and deleteassets/fastboot-fetch.js
- Once it is in
public
folder,ember-cli
will automatically build it and put it indist/ember-fetch/fastboot-fetch.js
after the build. - You can update this function to just be:
updateFastBootManifest: function(manifest) {
manifest.vendorFiles.push('ember-fetch/fastboot-fetch.js');
return manifest;
}
See the similar changes here.
Also see the migration guide here
@kratiahuja Thanks! That fixed it!!! |
LGTM. @scottmessinger thanks for tackling this. Can you confirm you tested all three scenarios listed here: https://gist.github.com/kratiahuja/d22de0fb1660cf0ef58f07a6bcbf1a1c#testing-guidelines ? Once you confirm, this should be good to be merged. Ideally we should add fastboot tests, but I'll open an issue in this repo. |
@scottmessinger pinging again if you have cycles to test this? If not, I'll test this over the weekend and merge. |
@kratiahuja I'm sorry! I haven't gotten a chance to test the three scenarios and I'm not sure when I'll get a chance to do it thoroughly :-( |
No worries, I'll test it over the weekend. |
Confirmed this works with the beta and rc builds. Merging this... |
Thanks @scottmessinger ! |
@stefanpenner I don't think I am an npm owner. Can we please do a 2.0.1 release? |
@stefanpenner can we release 2.0.1? |
@kratiahuja you are now an owner. |
released as v2.1.0 🎉 |
However I'm getting |
@cibernox I haven't seen that -- it makes me wonder if the fetch library that ember-fetch depends on is loading. |
This isn't working yet :-( But I think the basics are there. Anyone know why I'm seeing this error message?