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