Closed samth closed 11 years ago
What full module names and urls are generated by the system loader's default normalize/resolve behavior?
"x" -> "x" "../y" -> "a/y" "/z" -> "z" (although @dherman wonders if we should just not allow the leading "/")
The only question here is at which point in the pipeline this transformation happens. Options:
normalize
hooknormalize
and the input to resolve
We will have an answer for this in a couple days.
I vote for making the normalize hook do it.
This (making the normalize hook do it) is now implemented in the repo, just waiting for explicit agreement from @dherman / @samth to close it.
I say close it. On May 10, 2013 3:19 PM, "Jason Orendorff" notifications@github.com wrote:
P1 ISSUE: RELATIVE MODULE NAMES. Suppose we have a module
"a/b/c"
loaded from the url"http://example.com/scripts/a/b/c.js"
, and it does:What full module names and urls are generated by the system loader's default normalize/resolve behavior? According to @samth, the default normalize behavior is to return the name unchanged, so the full module names would be
"x"
,"../y"
, and"/z"
respectively. But samth has also said that those aren't valid module names.https://github.com/jorendorff/js-loaders/blob/master/loaders.js#L1435