Open tomwayson opened 6 years ago
Before I invest more time in https://github.com/ember-fastboot/ember-cli-fastboot/pull/553 I wanted to see if there's any update on this issue.
For context, we can load our library in SSR apps using other frameworks, just not Ember. We have a few internal teams and customers using Ember, and at least for our own team's Ember based application, SEO is a high priority.
So, would you accept a PR w/ my proposed changes above so that we can get SSR working for our application and unlock it for other applications using our library w/ Ember?
This is a high priority for me too. Would love to hear some feedback on this request.
In order to avoid conflicts w/ Dojo's
require()
my addon (and others) have to change the name of the globalrequire()
function used by Ember.When running an example app that uses my addon in FastBoot, I see this error when I load the page:
TypeError: ctx.require is not a function
, which comes from this line:https://github.com/ember-fastboot/fastboot/blob/8a408f60ef60329ae5bce21aa3bc111f83cddbbd/src/ember-app.js#L179
I've been able to get around that and get the app working by passing in
requireFunctionName
as one of thesandboxGlobals
and changing the above line to:There's probably a better way, but that does work, and doesn't break any of FastBoot's existing tests.
Would you accept a PR that adds and documents that change? If not, would you recommend a different way that I can achieve the same?