@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/cli.cjs CHANGED
@@ -14530,11 +14530,15 @@ var getServerFile = async (projectRoot, fileName) => {
14530
14530
  // modules/server/init.ts
14531
14531
  var INIT_FILE_NAME = "init.server";
14532
14532
  async function runInitIfExists(projectRoot, serverData) {
14533
- let mod = await getServerFile(projectRoot, INIT_FILE_NAME);
14534
- if (typeof mod?.init === "function") {
14535
- const serverContext = { ...serverData };
14536
- await mod.init({ serverContext });
14537
- return serverContext;
14533
+ try {
14534
+ let mod = await getServerFile(projectRoot, INIT_FILE_NAME);
14535
+ if (typeof mod?.init === "function") {
14536
+ const serverContext = { ...serverData };
14537
+ await mod.init({ serverContext });
14538
+ return serverContext;
14539
+ }
14540
+ } catch (error) {
14541
+ console.error(`[Init] Failed to load or execute ${INIT_FILE_NAME}.ts:`, error);
14538
14542
  }
14539
14543
  return {};
14540
14544
  }
@@ -15013,7 +15017,8 @@ async function buildServerApp(projectRoot, appDir, config) {
15013
15017
  target: "node18",
15014
15018
  jsx: "automatic",
15015
15019
  sourcemap: true,
15016
- bundle: false,
15020
+ bundle: true,
15021
+ packages: "external",
15017
15022
  logLevel: "info",
15018
15023
  tsconfig: import_path29.default.join(projectRoot, "tsconfig.json"),
15019
15024
  plugins: [pathAliasPlugin],