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
{{ message }}
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.
Currently the require JS code is caching modules based on the name. This means that if I have two different modules, with the same name in different folders, I will get the wrong module returned when making relative calls for it.
For example, with modules in the following folder structure
module1/foo
module2/foo
If I were to do a require('./foo') from within module2 - if module1/foo had already been required (and thus cached) then it would return the module1/foo module.
This can be resolved by changing the cache key from name to path, eg:
Currently the require JS code is caching modules based on the
name
. This means that if I have two different modules, with the same name in different folders, I will get the wrong module returned when making relative calls for it.For example, with modules in the following folder structure
If I were to do a
require('./foo')
from withinmodule2
- ifmodule1/foo
had already been required (and thus cached) then it would return themodule1/foo
module.This can be resolved by changing the cache key from
name
topath
, eg:Line 64: https://github.com/sstephenson/stitch/blob/master/src/stitch.coffee
The text was updated successfully, but these errors were encountered: