react-pdf

v9.1.1
Display PDFs in your React app as easily as if they were images.
pdf pdf-viewer react

build

yarn build-js && yarn copy-styles

build-js

yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package

build-js-esm

tsc --project tsconfig.build.json --outDir dist/esm

build-js-cjs

tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs --moduleResolution node --verbatimModuleSyntax false

build-js-cjs-package

echo '{ "type": "commonjs" }' > dist/cjs/package.json

clean

rimraf dist

copy-styles

cpy 'src/**/*.css' dist/esm && cpy 'src/**/*.css' dist/cjs

format

biome format

lint

biome lint

prepack

yarn clean && yarn build

test

yarn lint && yarn tsc && yarn format && yarn unit

tsc

tsc

unit

vitest

watch

yarn build-js-esm --watch & yarn build-js-cjs --watch & node --eval "fs.watch('src', () => child_process.exec('yarn copy-styles'))"
npm i react-pdf

Metadata

  • MIT
  • Whatever
  • Wojciech Maj
  • released 9/18/2024

Downloads

Maintainers