-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
Move away from index.js
file names on non-index files
#481
Comments
Done, except the |
fs_index? idx? |
There are more than 300 occurences in my whole project folder which points to this file. This can't be done within a minor release cycle. Do you have a small example I can use to reproduce this issue? |
The module is already working well enough for me but if a project requires specific imports then a developer may trip up on it. If I import/require:
The expectation in the Node CommonJS world is that For example if src/index.js looked like this, the above import assumption would align with the standard:
Instead with current code when I import |
There are several files that are built in
dist/
that contain anindex.js
file. For example:dist/module/index.js
These files however is for a the
Index
models and the files should be renamed_index.js
ordb.js
something more sensible that will not automatically be imported on require/import.Why? It conflicts with the CommonJS import system:
https://nodejs.org/api/modules.html#all-together
Some other good reading: https://dev.to/fahadaminshovon/-how-to-use-indexjs-fileproperly-302f
The text was updated successfully, but these errors were encountered: