Closed brandonweiss closed 9 years ago
That's the default behavior by design since file extensions are stripped.
You can achieve what you want by passing duplicates: true
. Then, you should get:
{
build: {},
'build.js': {},
test: {
local: {},
'local.js': {},
remote: {},
'remote.js': {}
},
'test.js': {},
}
Hope that helps; feel free to re-open if it doesn't!
I've got a directory structure that looks like this:
The output from recursively requiring is:
{ build: {}, test: { local: {}, remote: {} } }
But if I rename
test.js
tofoobar.js
, I get:{ build: {}, foobar: {}, test: { local: {}, remote: {} } }
It would appear it can't require directories and files if they have the same.