@lolyjs/core 0.3.0-alpha.0 → 0.3.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -9991,11 +9991,15 @@ var getServerFile = async (projectRoot, fileName) => {
9991
9991
  // modules/server/init.ts
9992
9992
  var INIT_FILE_NAME = "init.server";
9993
9993
  async function runInitIfExists(projectRoot, serverData) {
9994
- let mod = await getServerFile(projectRoot, INIT_FILE_NAME);
9995
- if (typeof mod?.init === "function") {
9996
- const serverContext = { ...serverData };
9997
- await mod.init({ serverContext });
9998
- return serverContext;
9994
+ try {
9995
+ let mod = await getServerFile(projectRoot, INIT_FILE_NAME);
9996
+ if (typeof mod?.init === "function") {
9997
+ const serverContext = { ...serverData };
9998
+ await mod.init({ serverContext });
9999
+ return serverContext;
10000
+ }
10001
+ } catch (error) {
10002
+ console.error(`[Init] Failed to load or execute ${INIT_FILE_NAME}.ts:`, error);
9999
10003
  }
10000
10004
  return {};
10001
10005
  }
@@ -18827,7 +18831,8 @@ async function buildServerApp(projectRoot, appDir, config) {
18827
18831
  target: "node18",
18828
18832
  jsx: "automatic",
18829
18833
  sourcemap: true,
18830
- bundle: false,
18834
+ bundle: true,
18835
+ packages: "external",
18831
18836
  logLevel: "info",
18832
18837
  tsconfig: path31.join(projectRoot, "tsconfig.json"),
18833
18838
  plugins: [pathAliasPlugin],