@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 +11 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +11 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +11 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
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:
|
|
18870
|
+
bundle: true,
|
|
18871
|
+
packages: "external",
|
|
18867
18872
|
logLevel: "info",
|
|
18868
18873
|
tsconfig: import_path35.default.join(projectRoot, "tsconfig.json"),
|
|
18869
18874
|
plugins: [pathAliasPlugin],
|