diff --git a/packages/anatomy/CHANGELOG.md b/packages/anatomy/CHANGELOG.md index 12241bf3b1..9c116b574c 100644 --- a/packages/anatomy/CHANGELOG.md +++ b/packages/anatomy/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +### Fixed + +- Resolved an issue where the `package.json` is missing export specifiers. + ## [2.3.0] - 2024-02-27 ### Changed diff --git a/packages/scripts/src/prepare-release.ts b/packages/scripts/src/prepare-release.ts index cf247a75a9..d545dd00e9 100644 --- a/packages/scripts/src/prepare-release.ts +++ b/packages/scripts/src/prepare-release.ts @@ -5,7 +5,7 @@ import path, { dirname } from 'path' import { match } from 'ts-pattern' const generateExports = (dirName: string) => { - const paths = globbySync('src/**/index.ts{x}') + const paths = globbySync('src/**/index.ts') const exports: Record = {} for (const p of paths) { @@ -16,10 +16,12 @@ const generateExports = (dirName: string) => { require: `${keyPath}/index.cjs`, } } - exports['./factory'] = { - types: './factory.d.ts', - import: './factory.mjs', - require: './factory.cjs', + if (dirName !== 'anatomy') { + exports['./factory'] = { + types: './factory.d.ts', + import: './factory.mjs', + require: './factory.cjs', + } } if (dirName === 'react') {