Install
Which package you need depends on one question: do you know what file you will be handed?
If you do, install that format and nothing else — it will not bring the others. If you do not, install the umbrella, which knows all of them and fetches the one that turns up.
| Situation | Install | What arrives |
|---|---|---|
| Any file, format unknown | @genomdev/genom | All four formats. In a browser they load on demand. |
Only Word (.docx and .doc) | @genomdev/docx | Word, the office kernel, the core. No PDF, no spreadsheet. |
| Only PDF | @genomdev/pdf | PDF and the core. **Not** the office kernel — no ZIP, no DrawingML. |
| Showing documents in React | @genomdev/react + a format | The wrapper depends on no format; you choose them. |
The commands
npm i @genomdev/genom
# @genomdev/core comes with itWhy the kernels are peer dependencies
@genomdev/core and @genomdev/office-core are declared as peer dependencies by every package that uses them, so npm and pnpm install exactly one copy of each. This is not tidiness. Two copies of the core mean two format registries, two ContentDocument classes and an instanceof that stops working without a single error anywhere.
npm 7+, pnpm and Bun install peer dependencies for you. Yarn does not — with Yarn, add @genomdev/core (and @genomdev/office-core for the office formats) to your own dependencies. The umbrella is the exception and depends on them normally, so npm i @genomdev/genom is one command on every package manager.
What your build has to support
Genom ships ESM only, and the entry points beyond the package root — @genomdev/docx/view, @genomdev/core/content — are subpath exports. That asks two things of the consumer, and both are satisfied by any toolchain from the last few years.
| Tool | Needs |
|---|---|
| TypeScript | moduleResolution of bundler, node16 or nodenext |
| Bundler | Vite, webpack 5, Rollup, esbuild, Parcel 2 — anything that reads exports |
| Node | 20.11 or newer |
| Angular | 21 or newer (the library is published in partial-Ivy form) |
moduleResolution: "node". There is no shim for this: those toolchains cannot resolve @genomdev/docx/view at all.