Update init function
This commit is contained in:
@@ -25,12 +25,6 @@ export default function () {
|
||||
|
||||
await bunextInit();
|
||||
|
||||
// await allPagesBunBundler();
|
||||
|
||||
await allPagesESBuildContextBundler({
|
||||
post_build_fn: serverPostBuildFn,
|
||||
});
|
||||
|
||||
await startServer();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ import { Command } from "commander";
|
||||
import startServer from "../../functions/server/start-server";
|
||||
import { log } from "../../utils/log";
|
||||
import bunextInit from "../../functions/bunext-init";
|
||||
import allPagesBunBundler from "../../functions/bundler/all-pages-bun-bundler";
|
||||
import allPagesESBuildContextBundler from "../../functions/bundler/all-pages-esbuild-context-bundler";
|
||||
|
||||
export default function () {
|
||||
return new Command("start")
|
||||
@@ -14,9 +12,6 @@ export default function () {
|
||||
|
||||
await bunextInit();
|
||||
|
||||
// await allPagesBunBundler();
|
||||
await allPagesESBuildContextBundler();
|
||||
|
||||
await startServer();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ export default async function allPagesESBuildContextBundler(params?: Params) {
|
||||
],
|
||||
jsx: "automatic",
|
||||
splitting: true,
|
||||
treeShaking: true,
|
||||
logLevel: "silent",
|
||||
// logLevel: "silent",
|
||||
// logLevel: dev ? "error" : "silent",
|
||||
|
||||
@@ -13,6 +13,8 @@ import { log } from "../utils/log";
|
||||
import cron from "./server/cron";
|
||||
import type { BuildContext } from "esbuild";
|
||||
import watcherEsbuildCTX from "./server/watcher-esbuild-ctx";
|
||||
import allPagesESBuildContextBundler from "./bundler/all-pages-esbuild-context-bundler";
|
||||
import serverPostBuildFn from "./server/server-post-build-fn";
|
||||
|
||||
/**
|
||||
* # Declare Global Variables
|
||||
@@ -60,8 +62,12 @@ export default async function bunextInit() {
|
||||
const is_dev = isDevelopment();
|
||||
|
||||
if (is_dev) {
|
||||
await allPagesESBuildContextBundler({
|
||||
post_build_fn: serverPostBuildFn,
|
||||
});
|
||||
watcherEsbuildCTX();
|
||||
} else {
|
||||
await allPagesESBuildContextBundler();
|
||||
cron();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user