Skip to content

Commit

Permalink
fix: ENOENT assets when htmldir exists (#2701)
Browse files Browse the repository at this point in the history
  • Loading branch information
everett1992 committed Jan 19, 2023
1 parent 3e1429e commit 5a65675
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/ui/node/reporter.ts
@@ -1,4 +1,4 @@
import { existsSync, promises as fs } from 'node:fs'
import { promises as fs } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { basename, dirname, relative, resolve } from 'pathe'
import c from 'picocolors'
Expand Down Expand Up @@ -50,8 +50,7 @@ export default class HTMLReporter implements Reporter {

const metaFile = resolve(htmlDir, 'html.meta.json')

if (!existsSync(htmlDir))
await fs.mkdir(resolve(htmlDir, 'assets'), { recursive: true })
await fs.mkdir(resolve(htmlDir, 'assets'), { recursive: true })

await fs.writeFile(metaFile, report, 'utf-8')
const ui = resolve(distDir, 'client')
Expand Down

0 comments on commit 5a65675

Please sign in to comment.