Greetings!
Having a situation where we are using tape which does not pass extensions to resolve. Have opened an issue here tape-testing/tape#395
That being said our situation is we use the .es ECMAScript extension with the following:
require.extensions ['.es'] = require.extensions ['.js']
Although we can achieve our needs with the previous tape issue/pr I feel it behoves resolve to use the default require.extensions list provided by node instead of only assuming ['.js'] here
|
var extensions = opts.extensions || ['.js']; |
.
An easy enhancement would be to convert:
var extensions = opts.extensions || ['.js'];
to
var extensions = opts.extensions
|| Object.keys (require.extensions)
Please advise and will have a PR & tests up ASAP as we need this or have to call off using tape and resolve. Can also enhance documentation which should close #134 which @ljharb, and @call-a3 are working on as well.
Thanks in advance! /cc @brandondees
Greetings!
Having a situation where we are using tape which does not pass
extensionsto resolve. Have opened an issue here tape-testing/tape#395That being said our situation is we use the
.esECMAScript extension with the following:Although we can achieve our needs with the previous tape issue/pr I feel it behoves resolve to use the default
require.extensionslist provided by node instead of only assuming['.js']hereresolve/lib/sync.js
Line 23 in 5f6e682
An easy enhancement would be to convert:
to
Please advise and will have a PR & tests up ASAP as we need this or have to call off using tape and resolve. Can also enhance documentation which should close #134 which @ljharb, and @call-a3 are working on as well.
Thanks in advance! /cc @brandondees