Fix build-dashboard (#8292)

This commit is contained in:
somebody1234 2023-11-15 00:34:33 +10:00 committed by GitHub
parent 3046e152dc
commit 85a1bda213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -32,12 +32,12 @@ async function bundle() {
}) })
opts.entryPoints.push( opts.entryPoints.push(
path.resolve(THIS_PATH, 'src', 'index.html'), path.resolve(THIS_PATH, 'src', 'index.html'),
path.resolve(THIS_PATH, 'src', '404.html'),
path.resolve(THIS_PATH, 'src', 'index.ts') path.resolve(THIS_PATH, 'src', 'index.ts')
) )
opts.metafile = ANALYZE opts.metafile = ANALYZE
opts.loader['.html'] = 'copy' opts.loader['.html'] = 'copy'
const result = await esbuild.build(opts) const result = await esbuild.build(opts)
await fs.copyFile('build/index.html', 'build/404.html')
if (result.metafile) { if (result.metafile) {
console.log(await esbuild.analyzeMetafile(result.metafile)) console.log(await esbuild.analyzeMetafile(result.metafile))
} }

View File

@ -1 +0,0 @@
index.html