Try and fix some building issues

This commit is contained in:
Jesse Wierzbinski 2024-03-12 08:27:50 -10:00
parent d29915456c
commit 986cc8a89c
No known key found for this signature in database
5 changed files with 84 additions and 82 deletions

View file

@ -1,6 +1,13 @@
// Delete dist directory
import chalk from "chalk";
import { rm, cp, mkdir, exists } from "fs/promises";
console.log(
chalk.red(
"Warning: Build is currently broken due to a bug in Bun causing it not to parse dynamic imports"
)
);
if (!(await exists("./pages/dist"))) {
console.log("Please build the Vite server first, or use `bun prod-build`");
process.exit(1);
@ -22,7 +29,7 @@ await Bun.build({
outdir: process.cwd() + "/dist",
target: "bun",
splitting: true,
minify: true,
minify: false,
external: ["bullmq"],
}).then(output => {
if (!output.success) {