Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Template to create your own Typescript React library with Rollup.

License

NotificationsYou must be signed in to change notification settings

asins/rollup-react-starter-lib-ts

 
 

Repository files navigation

npm versioninstall sizelicense

Template to create your own Typescript React library with Rollup.

  • Rollup v4 🎉
  • Compatible with new and old React versions, generates ESM/CJS files.

Build & Publish

You can use this template andchange the name under package.json.

Build

npm run build

Build & Watch

npm run build:watch

Publish (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=public

For local testing

cd your-lib-folder/

npm link

cd your-app/

npm link name-of-your-lib

Want to also minify bundle output?

You can install @rollup/plugin-terser

npm i @rollup/plugin-terser --save-dev --legacy-peer-deps

Configure

rollup.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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript57.3%
  • TypeScript42.7%

[8]ページ先頭

©2009-2025 Movatter.jp