0.1.14 • Published 2 years ago
cra-template-tsup v0.1.14
cra-template-tsup
Quickly publish Create React App with TypeScript to NPM.
yarn start
Start in development mode at http://localhost:3000.
yarn build
Build for production to /build
.
yarn pack
Package src/App.tsx
for publishing to /dist
.
Publishing
- Package for publishing with
yarn pack
. In package.json:
- Remove
"private": true
to allow public access. - Move
"react-scripts"
to"devDependencies"
. - Move
"react"
and"react-dom"
to"peerDependencies"
. - Add
"files": ["dist"]
to avoid ignoring. - Add
"main": "dist/App.js"
as the entry point. - Add
"types": "dist/App.d.ts"
as the type definitions.
- Remove
Release with
npm publish
.