diff --git a/scripts/patchCJS.ts b/scripts/patchCJS.ts index 7f0dfa1449dc3d..99758d6e08b72c 100644 --- a/scripts/patchCJS.ts +++ b/scripts/patchCJS.ts @@ -41,7 +41,7 @@ if (matchMixed) { writeFileSync(indexPath, lines.join('\n')) console.log(colors.bold(`${indexPath} CJS patched`)) - process.exit() + process.exit(0) } const matchDefault = code.match(/\nmodule.exports = (\w+);/) @@ -50,7 +50,7 @@ if (matchDefault) { code += `module.exports["default"] = ${matchDefault[1]};\n` writeFileSync(indexPath, code) console.log(colors.bold(`${indexPath} CJS patched`)) - process.exit() + process.exit(0) } console.error(colors.red(`${indexPath} CJS patch failed`))