Package Name

The Package Name is the CommonJS compatible module name for the Component, used and linked from the Workspace node_modules directory. By default, package names are computed from the Component ID. For example:

Component ID                      Package Name
----------------------------      -----------------------------
teambit.base-ui/input/button -->  @teambit/base-ui.input.button
CopiedCopy

A component's package name can be modified by configuring the PKG Aspect in its Component configuration.

Use the placeholders {name} and {scope} to inject the component's full name and scope name.

{
  "teambit.pkg/pkg": {
    "packageJson": {
      "name": "@{scope}/{name}"
    }
  }
}
CopiedCopy

Modifying a component's package name will affect the name of its package when packed as part of the build pipeline but also when symlinked in the workspace, during development.

info

Packages can be installed from Bit Cloud only by using their default package name. The modified package name will be available on other commonJS package registries.