You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to avoid conflicts w/ Dojo's require()my addon (and others) have to change the name of the global require() 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:
I've been able to get around that and get the app working by passing in requireFunctionName as one of the sandboxGlobals and changing the above line to:
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?
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:fastboot/src/ember-app.js
Line 179 in 8a408f6
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?
The text was updated successfully, but these errors were encountered: