Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ENOENT assets when htmldir exists #2701

Merged
merged 1 commit into from Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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