@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.cjs CHANGED
@@ -10027,11 +10027,15 @@ var getServerFile = async (projectRoot, fileName) => {
10027
10027
  // modules/server/init.ts
10028
10028
  var INIT_FILE_NAME = "init.server";
10029
10029
  async function runInitIfExists(projectRoot, serverData) {
10030
- let mod = await getServerFile(projectRoot, INIT_FILE_NAME);
10031
- if (typeof mod?.init === "function") {
10032
- const serverContext = { ...serverData };
10033
- await mod.init({ serverContext });
10034
- return serverContext;
10030
+ try {
10031
+ let mod = await getServerFile(projectRoot, INIT_FILE_NAME);
10032
+ if (typeof mod?.init === "function") {
10033
+ const serverContext = { ...serverData };
10034
+ await mod.init({ serverContext });
10035
+ return serverContext;
10036
+ }
10037
+ } catch (error) {
10038
+ console.error(`[Init] Failed to load or execute ${INIT_FILE_NAME}.ts:`, error);
10035
10039
  }
10036
10040
  return {};
10037
10041
  }
@@ -18863,7 +18867,8 @@ async function buildServerApp(projectRoot, appDir, config) {
18863
18867
  target: "node18",
18864
18868
  jsx: "automatic",
18865
18869
  sourcemap: true,
18866
- bundle: false,
18870
+ bundle: true,
18871
+ packages: "external",
18867
18872
  logLevel: "info",
18868
18873
  tsconfig: import_path35.default.join(projectRoot, "tsconfig.json"),
18869
18874
  plugins: [pathAliasPlugin],