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
Sofe tries to support loading services with an included path:
// The service name might have a path in it!
// For example, you might `import a from 'service/a/path.js!sofe';`
// In that case, we want `getServiceName` to return just `'service'`;
I don't know anyone who actually uses that feature (Canopy does not). The issue arises because the address variable in that code (https://github.com/CanopyTax/sofe/blob/master/src/utils.js#L14) is prefixed with the entire URL that the web-app was loaded from. So for an HTML5 push state web app, that URL could be lots of things depending on the link that loads the page. With hash routing, it is always only one thing. The logic in that code assumes that windowPath and address will always be roughly the same thing. That isn't the case, so there are cases where sofe gets confused and barfs. Again, only with HTML5 push state routing.
The question is, do I change this code to make pathed services actually work for HTML 5? Or do I remove the feature altogether? To be clear, the situation where I'm getting an error isn't using pathed services, but does break with HTML 5 push state routing.
The text was updated successfully, but these errors were encountered:
Sofe tries to support loading services with an included path:
See https://github.com/CanopyTax/sofe/blob/master/src/utils.js#L26
I don't know anyone who actually uses that feature (Canopy does not). The issue arises because the
address
variable in that code (https://github.com/CanopyTax/sofe/blob/master/src/utils.js#L14) is prefixed with the entire URL that the web-app was loaded from. So for an HTML5 push state web app, that URL could be lots of things depending on the link that loads the page. With hash routing, it is always only one thing. The logic in that code assumes thatwindowPath
andaddress
will always be roughly the same thing. That isn't the case, so there are cases where sofe gets confused and barfs. Again, only with HTML5 push state routing.The question is, do I change this code to make pathed services actually work for HTML 5? Or do I remove the feature altogether? To be clear, the situation where I'm getting an error isn't using pathed services, but does break with HTML 5 push state routing.
The text was updated successfully, but these errors were encountered: