package: CommonJS projects get their own declarations (dist/types-cjs; node16 / nodenext refused an ESM-only .d.ts from a CJS file, TS1541); the package-types test covers ES module and CommonJS projects under bundler / node16 / nodenext / node10 and loads the package with import() and require() under Node; pitfall 69
This commit is contained in:
parent
d717ceb4cd
commit
04647c079e
6 changed files with 42 additions and 14 deletions
|
|
@ -29,15 +29,16 @@
|
|||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/types/lib/config.d.ts",
|
||||
"bun": "./cli/lib/config.ts",
|
||||
"default": "./dist/config.js"
|
||||
"import": { "types": "./dist/types/lib/config.d.ts", "default": "./dist/config.js" },
|
||||
"require": { "types": "./dist/types-cjs/lib/config.d.ts", "default": "./dist/config.js" }
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/storebound.mjs",
|
||||
"dist/config.js",
|
||||
"dist/types",
|
||||
"dist/types-cjs",
|
||||
"cli",
|
||||
"templates",
|
||||
"skills",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue