jspm / npm

NPM Location Service
19 stars 34 forks source link

Transitive dependencies #86

Closed guybedford closed 9 years ago

guybedford commented 9 years ago

A package requiring a dependency of a dependency via require('dep/node_modules/depdep') isn't supported here.

The issue is there's no synchronous analog to a contextual require to replace this with.

One rewrite that may be suitable actually is:

require(System.normalizeSync('depdep', 'npm:dep@1.2.3/normalized/path.js'));

Which could actually work nicely.

guybedford commented 9 years ago

The obvious issue is that the above depends on dynamic requires to be supported.

guybedford commented 9 years ago

This is complex and hard. Much better to just fix with an override rather.