Skip to content

Commit dfa08aa

Browse files
committed
Remove publishConfig.directory from built package.json
1 parent 8512dff commit dfa08aa

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

packages/react/scripts/createPackageManifest.mts

+12-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ type TransformedExports = Record<
1414

1515
export async function createPackageManifest() {
1616
const packageData = await fse.readFile(path.resolve(PROJECT_ROOT, './package.json'), 'utf8');
17-
const { imports, exports, scripts, devDependencies, workspaces, ...otherPackageData } =
18-
JSON.parse(packageData);
17+
const {
18+
imports,
19+
exports,
20+
scripts,
21+
devDependencies,
22+
workspaces,
23+
publishConfig,
24+
...otherPackageData
25+
} = JSON.parse(packageData);
1926

2027
const newPackageData = {
2128
...otherPackageData,
@@ -32,6 +39,9 @@ export async function createPackageManifest() {
3239
},
3340
},
3441
exports: retargetExports(exports),
42+
publishConfig: {
43+
access: publishConfig.access,
44+
},
3545
};
3646

3747
const targetPath = path.resolve(PROJECT_BUILD_DIR, './package.json');

0 commit comments

Comments
 (0)