stealjs / steal

Gets JavaScript
https://stealjs.com
MIT License
1.36k stars 522 forks source link

Some paths config require the module name to be included #1506

Open chasenlehara opened 5 years ago

chasenlehara commented 5 years ago

I was expecting this configuration to work in can-route:

steal = {
    paths: {
        'src/routedata': 'src/routedata-definemap.js'
    }
};

Instead, I had to include can-route in the mapping:

steal = {
    paths: {
        'can-route/src/routedata': 'src/routedata-definemap.js'
    }
};

Is this expected? If so, can some more documentation around this be added?

matthewp commented 5 years ago

This can probably be improved: https://stealjs.com/docs/config.paths.html

It should have 2 signatures, one with moduleName on the left-hand side, and the other with glob (maybe the wrong word as they are not technically globs) on the left-hand side. It's never a partial path though.