-
Notifications
You must be signed in to change notification settings - Fork 3
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
Import normalization #14
Comments
We can still keep the directories around with the new style of imports:
We'd just need to re-export On a related note: personally, I much prefer naming modules explicitly: |
Ah, interesting, hadn't considered that variant. Agree on explicitly naming modules. How would you feel about:
I think getting rid of index where appropriate may be worth it regardless of whichever structure we land on. |
Addressed through #44 by dropping (most) usage of Original example:
Is now:
|
Currently, this repo does not use file extensions when importing modules. It also uses index imports in various locations.
As outlined in differences between ESM and CJS in the Node.js documentation, Node will no longer allow extensionless imports nor use of a directory index for ESM modules.
Webpack – used in this repo – is a bit of a different beast and may support these features for some time to come. For the sake of consistency across repos we could opt to force webpack to also require extensions and disallow use of a directory index:
This would require restructuring of nested modules. For example, refactoring
gfx
:Into:
The text was updated successfully, but these errors were encountered: