-
Notifications
You must be signed in to change notification settings - Fork 192
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
exports.types
after exports.default
#384
Comments
You can setup it using options, I don't think it is a good idea to change default logic |
Also I think you need to go to |
If you have |
Feature request: Built-in typescript warning about it microsoft/TypeScript#46861 |
exports.type
after exports.default
exports.types
after exports.default
In Community Conditions Definitions documentation, Node specifies that the So don't put |
To import a library, I use jsdelivr which uses enhanced-resolve. I had a problem with the order of the properties in
exports
:default
wasn't at the end. jsdelivr/jsdelivr#18496I prefer to define sources before types because sources are more important than types. And for the old properties
main
andtypes
, npm-package-json-lint definesmain
beforetypes
. It's more readable to have the same order formain
/types
andexports
sub-properties (e.g. cronnor/package.json).enhanced-resolve forces the
default
property to the end: assert default. Could be last only. The Node.js documentation indicates this:I understand that
default
should always be the last property amongnode-addons
,node
,import
,require
anddefault
. But the propertytypes
can be positioned wherever you want.I propose to filter the values of the
exports
to keep only the propertiesnode-addons
,node
,import
,require
anddefault
(maybe addwebpack
).Or exclude the
types
properties:The text was updated successfully, but these errors were encountered: