Skip to content

Commit c3bc704

Browse files
committed
Add constraints for exports field
1 parent 316114e commit c3bc704

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

constraints.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@ gen_enforced_field(WorkspaceCwd, 'license').
6767

6868
% The entrypoint for the package must be `./dist/cjs/index.js`.
6969
gen_enforced_field(WorkspaceCwd, 'main', './dist/cjs/index.js').
70+
gen_enforced_field(WorkspaceCwd, 'exports["."].require', './dist/cjs/index.js').
7071

7172
% The module entrypoint for the package must be `./dist/esm/index.js`.
7273
gen_enforced_field(WorkspaceCwd, 'module', './dist/esm/index.js').
74+
gen_enforced_field(WorkspaceCwd, 'exports["."].import', './dist/esm/index.js').
7375

7476
% The type definitions entrypoint the package must be `./dist/types/index.d.ts`.
7577
gen_enforced_field(WorkspaceCwd, 'types', './dist/types/index.d.ts').
78+
gen_enforced_field(WorkspaceCwd, 'exports["."].types', './dist/types/index.d.ts').
7679

7780
% The list of files included in the package must only include files generated
7881
% during the build step.

0 commit comments

Comments
 (0)