👉👉👉 View the detailed tutorial here: Publish React npm Package with Rollup
This is a starter kit for building and publishing a TypeScript React project using Rollup.js. The kit includes configuration files and an example project structure for bundling and publishing your code as an npm package.
- Ready-to-use configuration files for Rollup.js, TypeScript and React.
- Supports bundling and publishing code as an npm package.
- Includes an example project structure for easy reference.
- Clone or download the project to your local machine.
- Install the necessary dependencies by running
npm install
. - Write your TypeScript React code in the src/ directory.
- Build your code for production by running
npm run build
andnpm run build:types
. - Test your package locally by running
npm link
andnpm run start
. - Publish your package to npm by running
npm publish
.
rollup.config.js
: Configuration file for Rollup.js bundling.tsconfig.json
: Configuration file for TypeScript.package.json
: Configuration file for your npm package.