Skip to content

Commit

Permalink
chore: create build target dir if does not exist (#12581)
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxiemeihao authored Jun 27, 2022
1 parent 11e4bfe commit 5b94562
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function write (dest, code, zip) {
resolve()
}

if (!fs.existsSync(path.dirname(dest))) {
fs.mkdirSync(path.dirname(dest), { recursive: true })
}
fs.writeFile(dest, code, err => {
if (err) return reject(err)
if (zip) {
Expand Down

0 comments on commit 5b94562

Please sign in to comment.