Update build step

This commit is contained in:
2026-07-01 19:18:11 +01:00
parent 61a9d8d612
commit 817beacc7a
20 changed files with 139 additions and 62 deletions
+6 -2
View File
@@ -10,7 +10,7 @@ import grabConstants from "../utils/grab-constants";
import watcherEsbuildCTX from "./server/watcher-esbuild-ctx";
const dirNames = grabDirNames();
const { PAGES_DIR } = dirNames;
export default async function bunextInit() {
export default async function bunextInit(params) {
global.HMR_CONTROLLERS = [];
global.BUNDLER_CTX_MAP = {};
global.SSR_BUNDLER_CTX_MAP = {};
@@ -33,7 +33,11 @@ export default async function bunextInit() {
});
global.ROUTER = router;
const is_dev = isDevelopment();
if (is_dev) {
if (params?.build_only) {
log.build(`Building Modules ...`);
await allPagesESBuildContextBundler();
}
else if (is_dev) {
log.build(`Building Modules ...`);
await allPagesESBuildContextBundler({
post_build_fn: () => {