vike 0.4.245-commit-189d2b8 → 0.4.245-commit-6880dc7
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.
|
@@ -263,8 +263,7 @@ function getPageConfigsBuildTime(configDefinitionsResolved, plusFilesAll, userRo
|
|
|
263
263
|
return;
|
|
264
264
|
pageConfigGlobal.configValueSources[configName] = sources;
|
|
265
265
|
});
|
|
266
|
-
|
|
267
|
-
applyEffectsConfVal(pageConfigGlobal.configValueSources, configDefinitionsResolved.configDefinitionsGlobal, plusFilesAll);
|
|
266
|
+
applyEffects(pageConfigGlobal.configValueSources, configDefinitionsResolved.configDefinitionsGlobal, plusFilesAll);
|
|
268
267
|
sortConfigValueSources(pageConfigGlobal.configValueSources, null);
|
|
269
268
|
assertPageConfigGlobal(pageConfigGlobal, plusFilesAll);
|
|
270
269
|
const pageConfigs = objectEntries(configDefinitionsResolved.configDefinitionsLocal)
|
|
@@ -281,8 +280,7 @@ function getPageConfigsBuildTime(configDefinitionsResolved, plusFilesAll, userRo
|
|
|
281
280
|
configValueSources[configName] = sources;
|
|
282
281
|
});
|
|
283
282
|
const pageConfigRoute = determineRouteFilesystem(locationId, configValueSources);
|
|
284
|
-
|
|
285
|
-
applyEffectsConfVal(configValueSources, configDefinitionsLocal, plusFilesAll);
|
|
283
|
+
applyEffects(configValueSources, configDefinitionsLocal, plusFilesAll);
|
|
286
284
|
sortConfigValueSources(configValueSources, locationId);
|
|
287
285
|
const pageConfig = {
|
|
288
286
|
pageId: locationId,
|
|
@@ -802,7 +800,7 @@ function assertMetaUsage(metaVal, metaConfigDefinedAt) {
|
|
|
802
800
|
});
|
|
803
801
|
}
|
|
804
802
|
// Test: https://github.com/vikejs/vike/blob/441a37c4c1a3b07bb8f6efb1d1f7be297a53974a/test/playground/vite.config.ts#L39
|
|
805
|
-
function
|
|
803
|
+
function applyEffects(configValueSources, configDefinitions, plusFilesAll) {
|
|
806
804
|
objectEntries(configDefinitions).forEach(([configNameEffect, configDefEffect]) => {
|
|
807
805
|
const sourceEffect = configValueSources[configNameEffect]?.[0];
|
|
808
806
|
if (!sourceEffect)
|
|
@@ -811,19 +809,8 @@ function applyEffectsConfVal(configValueSources, configDefinitions, plusFilesAll
|
|
|
811
809
|
if (!effect)
|
|
812
810
|
return;
|
|
813
811
|
const configModFromEffect = effect;
|
|
812
|
+
// Apply config value changes first to create sources, then meta.env changes to modify their env
|
|
814
813
|
applyEffectConfVal(configModFromEffect, sourceEffect, configValueSources, configNameEffect, configDefEffect, configDefinitions, plusFilesAll);
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
// Test: https://github.com/vikejs/vike/blob/441a37c4c1a3b07bb8f6efb1d1f7be297a53974a/test/playground/pages/config-meta/effect/e2e-test.ts#L16
|
|
818
|
-
function applyEffectsMetaEnv(configValueSources, configDefinitions) {
|
|
819
|
-
objectEntries(configDefinitions).forEach(([configNameEffect, configDefEffect]) => {
|
|
820
|
-
const sourceEffect = configValueSources[configNameEffect]?.[0];
|
|
821
|
-
if (!sourceEffect)
|
|
822
|
-
return;
|
|
823
|
-
const effect = runEffect(configNameEffect, configDefEffect, sourceEffect);
|
|
824
|
-
if (!effect)
|
|
825
|
-
return;
|
|
826
|
-
const configModFromEffect = effect;
|
|
827
814
|
applyEffectMetaEnv(configModFromEffect, configValueSources, configDefEffect);
|
|
828
815
|
});
|
|
829
816
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.245-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.245-commit-6880dc7";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.245-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.245-commit-6880dc7';
|