Update dist
This commit is contained in:
+4
-3
@@ -1,5 +1,6 @@
|
||||
import _ from "lodash";
|
||||
import AppNames from "../../utils/grab-app-names";
|
||||
import { log } from "../../utils/log";
|
||||
import allPagesBundler from "../bundler/all-pages-bundler";
|
||||
import serverParamsGen from "./server-params-gen";
|
||||
import watcher from "./watcher";
|
||||
@@ -22,7 +23,7 @@ export default async function startServer(params) {
|
||||
else {
|
||||
const artifacts = EJSON.parse(readFileSync(HYDRATION_DST_DIR_MAP_JSON_FILE, "utf-8"));
|
||||
if (!artifacts?.[0]) {
|
||||
console.error(`Please build first.`);
|
||||
log.error("Please build first.");
|
||||
process.exit(1);
|
||||
}
|
||||
global.BUNDLER_CTX_MAP = artifacts;
|
||||
@@ -33,7 +34,7 @@ export default async function startServer(params) {
|
||||
const MAX_BUNDLE_READY_RETRIES = 10;
|
||||
while (!global.IS_FIRST_BUNDLE_READY) {
|
||||
if (bundle_ready_retries > MAX_BUNDLE_READY_RETRIES) {
|
||||
console.error(`Couldn't grab first bundle for dev environment`);
|
||||
log.error("Couldn't grab first bundle for dev environment");
|
||||
process.exit(1);
|
||||
}
|
||||
bundle_ready_retries++;
|
||||
@@ -41,6 +42,6 @@ export default async function startServer(params) {
|
||||
}
|
||||
const server = Bun.serve(serverParams);
|
||||
global.SERVER = server;
|
||||
console.log(`${name} Server Running on http://localhost:${server.port} ...`);
|
||||
log.server(`http://localhost:${server.port}`);
|
||||
return server;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user