We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Files that are excluded by an exclude: [glob], and are not written to ./dist, are still written to package.json#exports. I've created a small repo here: https://stackblitz.com/edit/tshy-exclude-exports?file=package.json&terminal=dev
exclude: [glob]
./dist
package.json#exports
Assuming the following package.json config:
"tshy": { "exclude": [ "src/**.test.ts" ], "exports": [ "src/*.ts" ] },
And the following source files:
/src/index.ts /src/another.ts /src/another.test.ts
The following dist files are generated: (as expected)
/dist/commonjs/another.d.ts /dist/commonjs/another.d.ts.map /dist/commonjs/another.js /dist/commonjs/another.js.map /dist/commonjs/index.d.ts /dist/commonjs/index.d.ts.map /dist/commonjs/index.js /dist/commonjs/index.js.map /dist/commonjs/package.json /dist/esm/another.d.ts /dist/esm/another.d.ts.map /dist/esm/another.js /dist/esm/another.js.map /dist/esm/index.d.ts /dist/esm/index.d.ts.map /dist/esm/index.js /dist/esm/index.js.map /dist/esm/package.json
Generated package.json#exports (unexpected)
"exports": { "./another.test": { <<< this shouldn't be here "import": { "types": "./dist/esm/another.test.d.ts", "default": "./dist/esm/another.test.js" }, "require": { "types": "./dist/commonjs/another.test.d.ts", "default": "./dist/commonjs/another.test.js" } }, "./another": { "import": { "types": "./dist/esm/another.d.ts", "default": "./dist/esm/another.js" }, "require": { "types": "./dist/commonjs/another.d.ts", "default": "./dist/commonjs/another.js" } }, ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" }, "require": { "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" } }, "./package.json": "./package.json" },
The text was updated successfully, but these errors were encountered:
Ah, yes, when it expands the glob exports, it's not using the excluded as an ignore patter, as it should be.
Sorry, something went wrong.
No branches or pull requests
Files that are excluded by an
exclude: [glob]
, and are not written to./dist
, are still written topackage.json#exports
. I've created a small repo here: https://stackblitz.com/edit/tshy-exclude-exports?file=package.json&terminal=devAssuming the following package.json config:
And the following source files:
The following dist files are generated: (as expected)
Generated
package.json#exports
(unexpected)The text was updated successfully, but these errors were encountered: