requirejs / almond

A minimal AMD API implementation for use after optimized builds
Other
2.42k stars 168 forks source link

Issue with relative path when they match such path: "../../vendor/some-lib/./some-file" #115

Closed cniaulin closed 8 years ago

cniaulin commented 8 years ago

In function normalize (l33) when parameters are for instance: name: "./some-file" baseName: "../../vendor/some-lib/"

When analyzing the path, it enters the if (l67) because the baseName was starting with "../..". Then it breaks and never remove the "./" from the path. In the end, the named module identified as "../../vendor/some-lib/some-file" will never get loaded because the dependency required will be "../../vendor/some-lib/./some-file".

I would be happy to submit a merge request but I before that I would like to understand what this "if" tries to solve in the first place and I don't really understand the comment below. Does somebody as any hint about that ?

jrburke commented 8 years ago

Duplicate of #116