Skip to content

Commit

Permalink
fix: support deep file paths on write
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 29, 2020
1 parent fa4c91b commit 48f2459
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export async function build({
console.log(
`write ${chalk.cyan(path.relative(process.cwd(), filepath))}`
)
await fs.mkdir(path.dirname(filepath), { recursive: true })
await fs.writeFile(filepath, chunk.code)
}
}
Expand Down

0 comments on commit 48f2459

Please sign in to comment.