The DevPkg feature allows developers to override npm packages with local development versions. This is particularly useful when working on multiple interconnected packages simultaneously, enabling real-time testing and debugging of changes across projects.
DevPkg modifies the Metro bundler configuration to prioritize specified local package directories over the versions installed in node_modules
. This allows you to use development versions of packages without publishing them to npm or manually linking them.
This file contains the configuration for DevPkg. Here's an example structure:
{
"enabled": true,
"packages": {
"your-local-package": {
"path": "/path/to/your/local/package",
"useDevEntryPoint": true
}
}
}
enabled
: Enables or disables the package overriding.packages
: A list of packages to override with local development versions.path
: The path to the local package directory.useDevEntryPoint
: If true, uses thedevEntryPoint
specified in the package.json of the local package. Otherwise, uses themain
field.