I have a use case where I want to bundle scoped packages.
When I add them to the package.json with their full name they don't get bundled though.
{
"bundleDependencies": ["@scope/package"]
}
Publishing and installing such a package works, but one gets the following error:
npm WARN installMany @scope/package was bundled with [email protected], but bundled package wasn't found in unpacked tree
Looking into the tarball that npm pack creates, they indeed aren't part of the bundle.
My second attempt was to just bundle the entire scope.
{
"bundleDependencies": ["@scope"]
}
This works at first glance, because the npm packed tarball indeed contains the packages, but it's then impossible to install this package/tarball, because the package "@scope" doesn't exist.
I'd expect both ways to work. Ran into this with [email protected].
I have a use case where I want to bundle scoped packages.
When I add them to the package.json with their full name they don't get bundled though.
{ "bundleDependencies": ["@scope/package"] }Publishing and installing such a package works, but one gets the following error:
Looking into the tarball that
npm packcreates, they indeed aren't part of the bundle.My second attempt was to just bundle the entire scope.
{ "bundleDependencies": ["@scope"] }This works at first glance, because the
npm packed tarball indeed contains the packages, but it's then impossible to install this package/tarball, because the package "@scope" doesn't exist.I'd expect both ways to work. Ran into this with [email protected].