@spfn/core 0.1.0-alpha.52 → 0.1.0-alpha.54
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.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/server/index.js +9 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -1
package/dist/index.js
CHANGED
|
@@ -3453,9 +3453,16 @@ async function loadAndMergeConfig(config) {
|
|
|
3453
3453
|
const cwd = process.cwd();
|
|
3454
3454
|
const configPath = join(cwd, "src", "server", "server.config.ts");
|
|
3455
3455
|
const configJsPath = join(cwd, "src", "server", "server.config.js");
|
|
3456
|
+
const builtConfigPath = join(cwd, ".spfn", "server", "server.config.js");
|
|
3456
3457
|
let fileConfig = {};
|
|
3457
|
-
if (existsSync(
|
|
3458
|
-
const configModule = await
|
|
3458
|
+
if (existsSync(builtConfigPath)) {
|
|
3459
|
+
const configModule = await import(builtConfigPath);
|
|
3460
|
+
fileConfig = configModule.default ?? {};
|
|
3461
|
+
} else if (existsSync(configJsPath)) {
|
|
3462
|
+
const configModule = await import(configJsPath);
|
|
3463
|
+
fileConfig = configModule.default ?? {};
|
|
3464
|
+
} else if (existsSync(configPath)) {
|
|
3465
|
+
const configModule = await import(configPath);
|
|
3459
3466
|
fileConfig = configModule.default ?? {};
|
|
3460
3467
|
}
|
|
3461
3468
|
return {
|