Generated by Spark: Fix all reported errors.

This commit is contained in:
2026-01-17 09:52:30 +00:00
committed by GitHub
parent 602b10c6f3
commit f6108cd08e
2 changed files with 16 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
import { mkdir } from 'fs/promises'
import { existsSync } from 'fs'
import { resolve } from 'path'
/**
* Spark Vite Plugin
*
@@ -23,6 +27,17 @@ export default function sparkPlugin() {
return html
},
async buildStart() {
const tmpDist = '/tmp/dist'
if (!existsSync(tmpDist)) {
try {
await mkdir(tmpDist, { recursive: true })
} catch (err) {
console.warn('[spark-vite-plugin] Could not create /tmp/dist:', err)
}
}
},
closeBundle() {
// Build completed successfully
// The Spark runtime may attempt to copy additional files after the build