-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
Describe the issue
We should consider creating a package or documenting recommended TypeScript Config and package.json export configs. For now using this issue to capture some common guidance today:
- use
strict - Do not enable
skipLibCheck: true, see: https://github.com/remcohaszing/skiplibcheck - Prefer "moduleResolution": "Node16" (or higher) for web+node / node-only libraries or "moduleResolution": "bundler" for web-only libraries. Related have a package.json structure of:
Which enables base and secondary entrypoints from
"type": "module", "exports": { "./package.json": "./package.json", ".": { "types": "./dist/esm/index.d.ts", "import": "./dist/esm/index.js" }, "./*": { "types": "./dist/esm/*.d.ts", "import": "./dist/esm/*/index.js" } }, "typesVersions": { "*": { "*": [ "dist/esm/*", "dist/esm/*/index.d.ts" ] } },indexfiles and is a file structure / package.json configuration compatible with modern and legacy node import behaviors.
Reactions are currently unavailable