Merge pull request #25321 from backstage/blam/fix-package-bundling
Fix subpath bundling issues
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-defaults': patch
|
||||
---
|
||||
|
||||
Repack the package to fix issues with typescript with named exports
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Subpath export `package.json` should be of a unique name to avoid typescript resolution issues
|
||||
@@ -180,7 +180,9 @@ async function prepareExportsEntryPoints(
|
||||
await fs.writeJson(
|
||||
resolvePath(entryPointDir, PKG_PATH),
|
||||
{
|
||||
name: pkg.name,
|
||||
// Need a temporary name, as sharing the same name causes some typescript issues with caching of packages names
|
||||
// And their defined `types` field.
|
||||
name: `${pkg.name}__${entryPoint.name.toLocaleLowerCase('en-US')}`,
|
||||
version: pkg.version,
|
||||
...(exp.default ? { main: posixPath.join('..', exp.default) } : {}),
|
||||
...(exp.import ? { module: posixPath.join('..', exp.import) } : {}),
|
||||
|
||||
Reference in New Issue
Block a user