Files
pnpm/packages/types
Sascha Tandel 8fa11f5139 feat(publishConfig): add additional well-known fields
Overriding some fields in the manifest, before the package is packed is a great
feature. [Package Bundlers](https://github.com/stereobooster/package.json#package-bundlers)
support several additional fields.

This commit adds some of those well-known additional fields:

- [`browser`](https://github.com/stereobooster/package.json#browser)
- [`esnext`](https://github.com/stereobooster/package.json#esnext)
- [`es2015`](https://github.com/stereobooster/package.json#es2015)
- [`unpkg`](https://github.com/stereobooster/package.json#unpkg)
- `umd:main`: used by [microbundle](https://github.com/developit/microbundle)
- `exports`: Node.js [Package Exports](https://nodejs.org/api/esm.html#esm_package_exports)

Additionally the `bin` field may be overridden.

PR #2126
2019-11-05 19:14:25 +02:00
..
2019-10-06 01:03:17 +03:00

@pnpm/types

Basic types used by pnpm

npm version

Installation

<pnpm|npm|yarn> add @pnpm/types

Usage

import { PackageManifest } from '@pnpm/types'

const pkg: PackageManifest = {
  name: 'foo',
  version: '1.0.0',
}

License

MIT © Zoltan Kochan