fix(build): honor postinstall disable flag

This commit is contained in:
Ayaan Zaidi
2026-04-08 20:51:08 +05:30
parent 66ec8909bd
commit f4ec59c431
2 changed files with 20 additions and 0 deletions

View File

@@ -154,6 +154,9 @@ export function runBundledPluginPostinstall(params = {}) {
const spawn = params.spawnSync ?? spawnSync;
const pathExists = params.existsSync ?? existsSync;
const log = params.log ?? console;
if (env?.[DISABLE_POSTINSTALL_ENV]?.trim()) {
return;
}
if (isSourceCheckoutRoot({ packageRoot, existsSync: pathExists })) {
try {
pruneBundledPluginSourceNodeModules({