Support --exports
option to generate package.json exports
.
#43
Labels
enhancement
New feature or request
--exports
option to generate package.json exports
.
#43
Add an
--exports
option that will generate package.jsonexports
based on the build output.It should not support any additional configuration but instead assume basic defaults (if it requires a configuration file, then I see little point in automating this).
The option should accept these values:
wildcard
uses the first path segment frompath.parse().dir
run on each directory within the build output to build a wildcard subpath.dir
uses the last path segment frompath.parse().dir
run on each directory within the build output to build a wildcard subpath.name
uses thepath.parse().name
run on each file in the build output to build the subpath.The option should use these defaults:
types
,import
,require
anddefault
will be included.main
maps to the"."
subpath wheredefault
is exactly the value inmain
, and all otherdefault
conditional exports in defined subpaths will use the module system implied by the file extension (or directory) used in themain
value.The text was updated successfully, but these errors were encountered: