Skip to content

Commit

Permalink
fix: build command fails in Windows (#9329)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Jul 24, 2022
1 parent ffb2ba3 commit 8cabdd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/patchCJS.ts
Expand Up @@ -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+);/)
Expand All @@ -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`))
Expand Down

0 comments on commit 8cabdd7

Please sign in to comment.