Releasing a library written in TypeScript on NPM
summary
Shows how to publish a TypeScript library using TypeScript + Rollup with a concrete config, recommends rollup-plugin-typescript2 and terser, and outputs both CommonJS and ES modules plus .d.ts files in a dist folder. Uses rimraf and mkdirp in npm scripts, sets "main" and "module" and "types" in package.json, keeps React and ReactDOM as peerDependencies react react-dom, and reports that consumers get working autocomplete and type declarations after npm publish.
AI-written summary · about








