- Notifications
You must be signed in to change notification settings - Fork2
Template to create your own Typescript React library with Rollup.
License
thiswallz/rollup-react-starter-lib-ts
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Template to create your own Typescript React library with Rollup.
- Rollup v3 🎉
- Compatible with new and old React versions, generates ESM/CJS files.
You can use this template andchange the name under package.json.
Build
npm run buildBuild & Watch
npm run build:watchPublish (public library)
Be sure you are either logged in undernpm login or you have a token (checkhttps://docs.npmjs.com/creating-and-viewing-access-tokens).
npm run publish --access=publiccd your-lib-folder/
npm linkcd your-app/
npm link name-of-your-libYou can install rollup-plugin-terser (still works with rollup v3, but since it has no updates, we need to install it with legacy peer options)
npm i rollup-plugin-terser --save-dev --legacy-peer-depsrollup.config.mjs
import{terser}from'rollup-plugin-terser';... plugins:[peerDepsExternal(),resolve(),commonjs(),typescript({tsconfig:"./tsconfig.json"}),terser(),// we add it here]
About
Template to create your own Typescript React library with Rollup.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.