Skip to content

vp pm pack ​

Create a package tarball from the project. This is different from vp pack, which builds libraries with tsdown.

bash
vp pm pack
vp pm pack --pack-destination ./artifacts

Options ​

OptionDescriptionNotes
-r, --recursivePack all workspace packages.
--filter <pattern>Select workspaces by pattern.Can be repeated.
--out <out>Choose the tarball output path.
--pack-destination <pack-destination>Choose the tarball output directory.
--pack-gzip-level <pack-gzip-level>Request a gzip compression level from 0 through 9.
--jsonRequest native JSON output.Output retains the native schema.

Compatibility ​

  • npm: npm pack.
  • pnpm: pnpm pack.
  • Yarn Classic: yarn pack.
  • Yarn Modern: yarn pack.
  • Bun: bun pm pack.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
-r, --recursiveYesYesNoYesNo
--filter <pattern>YesYesNoYesNo
--out <out>NoYesYesYesYes
--pack-destination <pack-destination>YesYesNoNoYesVite+ creates the directory for npm.
--pack-gzip-level <pack-gzip-level>NoYesNoNoYes
--jsonYesYesYesYesNo

Native Options ​

For native options, see npm pack, pnpm pack, Yarn pack, Yarn Classic pack, and Bun pm pack. To pass these options through Vite+, see Native Arguments.