-
-
Notifications
You must be signed in to change notification settings - Fork 187
Description
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
Line 23 in 5f6e682
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