-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve does not preserve require.extensions
list and assumes only ['.js']
#137
resolve does not preserve require.extensions
list and assumes only ['.js']
#137
Comments
This would be a breaking change; You can certainly use |
If this package's goal is to implement the node.js Using a truncated default extensions list makes this library default to non-node-like behavior. Packages like |
It should be noted that both |
I think it's good to not rely too heavily on global runtime vars to configure default values. The whole point of this package instead of using |
That makes sense to me. Changing the hardcoded default to match the extensions given in the docs seems preferable. |
@TehShrike hence https://github.com/browserify/resolve/pull/138/files This way even if someone is on some ancient deprecated api that's technically superfluous to the intent of what the library is assumed to accomplish. Feels quite awkward one would have to pass in the standard |
Extension list sourced from https://nodejs.org/api/modules.html#modules_file_modules Fixes browserify#137
Interested parties should go review #145. |
Extension list sourced from https://nodejs.org/api/modules.html#modules_file_modules Fixes browserify#137
Closing this in favor of #166, to centralize further discussion. |
Greetings!
Having a situation where we are using tape which does not pass
extensions
to resolve. Have opened an issue here tape-testing/tape#395That being said our situation is we use the
.es
ECMAScript 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.extensions
list 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
The text was updated successfully, but these errors were encountered: