Home

publishConfig

PublishConfig is a field in a package manifest (most commonly package.json) used to influence the publishing behavior of a package. It allows a package author to override default publish settings for that specific package, rather than applying the same settings to all packages in a project.

The publishConfig object typically includes keys such as:

- access: controls whether the published package is public or restricted (commonly used for scoped packages).

- registry: a custom registry URL to publish to, overriding the default registry.

- tag: the distribution tag under which the package should be published (for example, "latest" or "next").

For example, a package.json with publishConfig: { "access": "public", "registry": "https://registry.npmjs.org/", "tag": "latest" } directs the publish process

Behavior and overrides: When you run a publish command, the package manager consults publishConfig to determine

Scope and usage: publishConfig is commonly used in multi-package repositories or workspaces to tailor publishing behavior

See also: package.json, npm publish, dist-tags, registries.

to
publish
publicly
to
the
specified
registry
under
the
given
tag.
how
to
publish
unless
you
override
the
settings
with
CLI
options.
Commands
like
npm
publish
--tag
beta
or
npm
publish
--registry
https://custom.registry.org
can
override
the
publishConfig
values
for
that
invocation.
per
package.
While
it
is
a
standard
feature
in
npm’s
workflow,
the
exact
support
and
behavior
can
vary
across
different
package
managers,
so
users
should
verify
compatibility
with
their
tooling.