release: WRNexusJS 0.5.10
This commit is contained in:
@@ -182,6 +182,15 @@ export interface BuildConfig {
|
||||
adapter?: "bun" | "node" | "static" | "serverless" | "edge" | string;
|
||||
}
|
||||
|
||||
export interface NavigationConfig {
|
||||
/**
|
||||
* `client` progressively enhances same-origin links with in-place page swaps.
|
||||
* `document` keeps normal browser navigation so every route performs a fresh
|
||||
* server-rendered document request.
|
||||
*/
|
||||
mode?: "client" | "document";
|
||||
}
|
||||
|
||||
export interface AppConfig {
|
||||
/** Compiler/dev/build plugins, resolved in deterministic pre/normal/post order. */
|
||||
plugins?: PluginInput;
|
||||
@@ -195,6 +204,8 @@ export interface AppConfig {
|
||||
tenancy?: TenancyConfig;
|
||||
/** Build cache, source map, report, and deployment adapter settings. */
|
||||
build?: BuildConfig;
|
||||
/** Page navigation strategy. Defaults to progressive client navigation. */
|
||||
navigation?: NavigationConfig;
|
||||
/** Development-only page diagnostics toolbar. Enabled by default in development. */
|
||||
devToolbar?: boolean | DevToolbarConfig;
|
||||
/** Raw HTML appended to every page's `<head>` (e.g. CDN stylesheet links). */
|
||||
@@ -294,8 +305,12 @@ export async function loadRawConfig(appRoot: string): Promise<AppConfig> {
|
||||
|
||||
/** Load `wrnexus.config.*`, applying the active profile's overrides. */
|
||||
export async function loadAppConfig(appRoot: string, profile?: string): Promise<AppConfig> {
|
||||
const base = await loadRawConfig(appRoot);
|
||||
const active = profile ?? resolveProfile();
|
||||
// Configuration modules commonly read DATABASE_URL and other settings during
|
||||
// module evaluation. Load the profile cascade before importing the module so
|
||||
// development and production behave consistently.
|
||||
loadEnv(appRoot, active);
|
||||
const base = await loadRawConfig(appRoot);
|
||||
const override = base.profiles?.[active];
|
||||
const merged: AppConfig = override ? deepMerge(base, override) : { ...base };
|
||||
delete merged.profiles;
|
||||
|
||||
Reference in New Issue
Block a user