vike 0.4.222-commit-6647d1e → 0.4.222
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/cjs/node/plugin/index.js +1 -1
- package/dist/cjs/node/plugin/plugins/baseUrls.js +1 -6
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +14 -7
- package/dist/cjs/node/runtime/globalContext.js +6 -17
- package/dist/cjs/node/runtime/renderPage/loadUserFilesServerSide.js +1 -1
- package/dist/cjs/node/runtime/renderPage/renderPageAlreadyRouted.js +4 -2
- package/dist/cjs/node/runtime/renderPage.js +8 -4
- package/dist/cjs/node/shared/resolveBase.js +13 -0
- package/dist/cjs/shared/getPageConfigsRuntime.js +8 -2
- package/dist/cjs/shared/page-configs/getPageConfigUserFriendly.js +12 -44
- package/dist/cjs/shared/page-configs/serialize/parsePageConfigs.js +8 -2
- package/dist/cjs/shared/route/loadPageRoutes.js +1 -1
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assertSingleInstance.js +1 -1
- package/dist/esm/client/client-routing-runtime/getPageContextCurrent.d.ts +2 -2
- package/dist/esm/client/client-routing-runtime/getPageContextFromHooks.d.ts +4 -4
- package/dist/esm/client/client-routing-runtime/prefetch/getPrefetchSettings.d.ts +2 -2
- package/dist/esm/client/client-routing-runtime/prefetch.d.ts +2 -2
- package/dist/esm/client/client-routing-runtime/prefetch.js +2 -2
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.js +1 -1
- package/dist/esm/client/server-routing-runtime/getPageContext.d.ts +1 -1
- package/dist/esm/client/shared/executeOnRenderClientHook.d.ts +2 -2
- package/dist/esm/client/shared/loadUserFilesClientSide.d.ts +2 -2
- package/dist/esm/client/shared/loadUserFilesClientSide.js +2 -2
- package/dist/esm/client/shared/preparePageContextForUserConsumptionClientSide.d.ts +2 -2
- package/dist/esm/node/plugin/index.d.ts +1 -4
- package/dist/esm/node/plugin/index.js +1 -1
- package/dist/esm/node/plugin/plugins/baseUrls.js +1 -6
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.d.ts +2 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +15 -8
- package/dist/esm/node/runtime/globalContext.d.ts +8 -9
- package/dist/esm/node/runtime/globalContext.js +6 -17
- package/dist/esm/node/runtime/html/injectAssets/getViteDevScript.d.ts +2 -2
- package/dist/esm/node/runtime/html/injectAssets.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/analyzePage.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/executeOnBeforeRenderAndDataHooks.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/getPageAssets.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/handleErrorWithoutErrorPage.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/loadUserFilesServerSide.d.ts +3 -3
- package/dist/esm/node/runtime/renderPage/loadUserFilesServerSide.js +2 -2
- package/dist/esm/node/runtime/renderPage/log404/index.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/preparePageContextForUserConsumptionServerSide.d.ts +4 -4
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.d.ts +12 -12
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.js +4 -2
- package/dist/esm/node/runtime/renderPage.js +8 -4
- package/dist/esm/node/shared/resolveBase.d.ts +9 -1
- package/dist/esm/node/shared/resolveBase.js +13 -0
- package/dist/esm/shared/getPageConfigsRuntime.d.ts +2 -2
- package/dist/esm/shared/getPageConfigsRuntime.js +9 -3
- package/dist/esm/shared/getPageFiles.d.ts +1 -1
- package/dist/esm/shared/hooks/getHook.d.ts +3 -3
- package/dist/esm/shared/page-configs/Config.d.ts +1 -3
- package/dist/esm/shared/page-configs/PageConfig.d.ts +2 -9
- package/dist/esm/shared/page-configs/getPageConfigUserFriendly.d.ts +16 -24
- package/dist/esm/shared/page-configs/getPageConfigUserFriendly.js +12 -44
- package/dist/esm/shared/page-configs/serialize/PageConfigSerialized.d.ts +2 -3
- package/dist/esm/shared/page-configs/serialize/parsePageConfigs.js +8 -2
- package/dist/esm/shared/route/executeGuardHook.d.ts +2 -2
- package/dist/esm/shared/route/loadPageRoutes.js +1 -1
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/assertSingleInstance.js +1 -1
- package/dist/esm/utils/projectInfo.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ export type { HookLoc };
|
|
|
9
9
|
export type { HookTimeout };
|
|
10
10
|
export type { HooksTimeoutProvidedByUser };
|
|
11
11
|
export { getHookTimeoutDefault };
|
|
12
|
-
import type {
|
|
12
|
+
import type { PageConfigUserFriendly } from '../getPageFiles.js';
|
|
13
13
|
import type { HookName, HookNamePage, HookNameGlobal } from '../page-configs/Config.js';
|
|
14
14
|
import type { PageConfigGlobalRuntime, PageConfigRuntime } from '../page-configs/PageConfig.js';
|
|
15
15
|
type Hook = HookLoc & {
|
|
@@ -26,10 +26,10 @@ type HookTimeout = {
|
|
|
26
26
|
warning: number | false;
|
|
27
27
|
};
|
|
28
28
|
type HooksTimeoutProvidedByUser = false | Partial<Record<HookName, false | Partial<HookTimeout>>>;
|
|
29
|
-
declare function getHook(pageContext:
|
|
29
|
+
declare function getHook(pageContext: PageConfigUserFriendly, hookName: HookName): null | Hook;
|
|
30
30
|
declare function getHookFromPageConfig(pageConfig: PageConfigRuntime, hookName: HookNamePage): null | Hook;
|
|
31
31
|
declare function getHookFromPageConfigGlobal(pageConfigGlobal: PageConfigGlobalRuntime, hookName: HookNameGlobal): null | Hook;
|
|
32
|
-
declare function assertHook<TPageContext extends
|
|
32
|
+
declare function assertHook<TPageContext extends PageConfigUserFriendly, THookName extends PropertyKey & HookName>(pageContext: TPageContext, hookName: THookName): asserts pageContext is TPageContext & {
|
|
33
33
|
exports: Record<THookName, Function | undefined>;
|
|
34
34
|
};
|
|
35
35
|
declare function getHookTimeoutDefault(hookName: HookName): HookTimeout;
|
|
@@ -32,7 +32,6 @@ export type { OnRenderHtmlAsync };
|
|
|
32
32
|
export type { OnRenderHtmlSync };
|
|
33
33
|
export type { RouteAsync };
|
|
34
34
|
export type { RouteSync };
|
|
35
|
-
export type { Route };
|
|
36
35
|
export type { KeepScrollPosition };
|
|
37
36
|
import type { PrefetchSetting, PrefetchStaticAssets } from '../../client/client-routing-runtime/prefetch/PrefetchSetting.js';
|
|
38
37
|
import type { ConfigDefinition } from '../../node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js';
|
|
@@ -224,7 +223,6 @@ type RouteSync = (pageContext: PageContextServer | PageContextClient) => {
|
|
|
224
223
|
routeParams?: Record<string, string>;
|
|
225
224
|
precedence?: number;
|
|
226
225
|
} | boolean;
|
|
227
|
-
type Route = string | RouteSync | RouteAsync;
|
|
228
226
|
/** Whether the page scrolls to the top upon navigation.
|
|
229
227
|
*
|
|
230
228
|
* https://vike.dev/keepScrollPosition
|
|
@@ -241,7 +239,7 @@ type ConfigBuiltIn = {
|
|
|
241
239
|
*
|
|
242
240
|
* https://vike.dev/route
|
|
243
241
|
*/
|
|
244
|
-
route?:
|
|
242
|
+
route?: string | RouteAsync | RouteSync | ImportString;
|
|
245
243
|
/** Protect page(s), e.g. forbid unauthorized access.
|
|
246
244
|
*
|
|
247
245
|
* https://vike.dev/guard
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export type { PageConfigRuntime };
|
|
2
2
|
export type { PageConfigRuntimeLoaded };
|
|
3
3
|
export type { PageConfigBuildTime };
|
|
4
|
-
export type { PageConfigCommon };
|
|
5
|
-
export type { PageConfigRoute };
|
|
6
4
|
export type { ConfigEnv };
|
|
7
5
|
export type { ConfigEnvInternal };
|
|
8
6
|
export type { PageConfigGlobalRuntime };
|
|
@@ -25,13 +23,8 @@ import type { ConfigDefinitions } from '../../node/plugin/plugins/importUserCode
|
|
|
25
23
|
import type { PlusFile, PlusFilesByLocationId } from '../../node/plugin/plugins/importUserCode/v1-design/getVikeConfig/getPlusFilesAll.js';
|
|
26
24
|
type PageConfigCommon = {
|
|
27
25
|
pageId: string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
isErrorPage: true;
|
|
31
|
-
routeFilesystem?: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
isErrorPage?: undefined;
|
|
34
|
-
routeFilesystem: {
|
|
26
|
+
isErrorPage?: true;
|
|
27
|
+
routeFilesystem?: {
|
|
35
28
|
routeString: string;
|
|
36
29
|
definedBy: string;
|
|
37
30
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export type { PageConfigsUserFriendly };
|
|
1
|
+
export { getPageConfigUserFriendlyOld };
|
|
2
|
+
export { getPageConfigUserFriendlyNew };
|
|
3
|
+
export type { ConfigUserFriendly };
|
|
5
4
|
export type { PageConfigUserFriendly };
|
|
6
|
-
export type {
|
|
5
|
+
export type { PageConfigsUserFriendly };
|
|
7
6
|
export type { Source };
|
|
8
7
|
export type { Sources };
|
|
9
8
|
export type { From };
|
|
@@ -11,10 +10,9 @@ export type { ExportsAll };
|
|
|
11
10
|
export type { ConfigEntries };
|
|
12
11
|
import type { FileType } from '../getPageFiles/fileTypes.js';
|
|
13
12
|
import type { PageFile } from '../getPageFiles/getPageFileObject.js';
|
|
14
|
-
import type { ConfigValues,
|
|
13
|
+
import type { ConfigValues, PageConfigGlobalRuntime, PageConfigRuntimeLoaded } from './PageConfig.js';
|
|
15
14
|
import { type ConfigDefinedAtOptional } from './getConfigDefinedAt.js';
|
|
16
15
|
import type { ConfigResolved } from './Config/PageContextConfig.js';
|
|
17
|
-
import type { Route } from './Config.js';
|
|
18
16
|
type ExportsAll = Record<string, {
|
|
19
17
|
exportValue: unknown;
|
|
20
18
|
exportSource: string;
|
|
@@ -35,7 +33,7 @@ type ConfigEntries = Record<string, {
|
|
|
35
33
|
configDefinedAt: ConfigDefinedAtOptional;
|
|
36
34
|
configDefinedByFile: string | null;
|
|
37
35
|
}[]>;
|
|
38
|
-
type
|
|
36
|
+
type PageConfigUserFriendly = {
|
|
39
37
|
config: ConfigResolved;
|
|
40
38
|
source: Source;
|
|
41
39
|
sources: Sources;
|
|
@@ -76,24 +74,18 @@ type SourceConfigsComputed = {
|
|
|
76
74
|
type: 'configsComputed';
|
|
77
75
|
value: unknown;
|
|
78
76
|
};
|
|
79
|
-
type
|
|
77
|
+
type PageConfigsUserFriendly = Record<string, // pageId
|
|
78
|
+
// pageId
|
|
79
|
+
ConfigUserFriendly & {
|
|
80
|
+
route: string | null;
|
|
81
|
+
}>;
|
|
82
|
+
type ConfigUserFriendly = {
|
|
80
83
|
config: ConfigResolved;
|
|
81
84
|
_source: Source;
|
|
82
85
|
_sources: Sources;
|
|
83
86
|
_from: From;
|
|
84
87
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
isErrorPage?: undefined;
|
|
90
|
-
} | {
|
|
91
|
-
route?: undefined;
|
|
92
|
-
isErrorPage: true;
|
|
93
|
-
};
|
|
94
|
-
type PageConfigUserFriendlyWithRoute = PageConfigUserFriendly & WithRoute;
|
|
95
|
-
declare function getPageConfigUserFriendly(pageConfigGlobalValues: ConfigValues, pageConfig: PageConfigRuntime | PageConfigBuildTime, pageConfigValues: ConfigValues): [string, PageConfigUserFriendlyWithRoute];
|
|
96
|
-
declare function getPageConfigGlobalUserFriendly({ pageConfigGlobalValues }: {
|
|
97
|
-
pageConfigGlobalValues: ConfigValues;
|
|
98
|
-
}): PageConfigUserFriendly;
|
|
99
|
-
declare function getPageConfigUserFriendly_oldDesign(pageFiles: PageFile[], pageConfig: PageConfigRuntimeLoaded | null, pageConfigGlobal: PageConfigGlobalRuntime): PageConfigUserFriendlyOld;
|
|
88
|
+
declare function getPageConfigUserFriendlyNew(pageConfig: {
|
|
89
|
+
configValues: ConfigValues;
|
|
90
|
+
}): ConfigUserFriendly;
|
|
91
|
+
declare function getPageConfigUserFriendlyOld(pageFiles: PageFile[], pageConfig: PageConfigRuntimeLoaded | null, pageConfigGlobal: PageConfigGlobalRuntime): PageConfigUserFriendly;
|
|
@@ -1,51 +1,20 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { getPageConfigGlobalUserFriendly };
|
|
1
|
+
export { getPageConfigUserFriendlyOld };
|
|
2
|
+
export { getPageConfigUserFriendlyNew };
|
|
4
3
|
import { assertDefaultExports, forbiddenDefaultExports } from '../getPageFiles/assert_exports_old_design.js';
|
|
5
4
|
import { getConfigDefinedAtOptional, getDefinedAtString } from './getConfigDefinedAt.js';
|
|
6
5
|
import { getConfigValueFilePathToShowToUser } from './helpers.js';
|
|
7
6
|
import { assert, isObject, assertWarning, assertUsage, makeLast, isBrowser, isScriptFile, isTemplateFile } from '../utils.js';
|
|
8
7
|
import pc from '@brillout/picocolors';
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
let page;
|
|
12
|
-
if (!pageConfig.isErrorPage) {
|
|
13
|
-
const route = pageConfigUserFriendly.config.route ?? pageConfig.routeFilesystem.routeString;
|
|
14
|
-
page = {
|
|
15
|
-
...pageConfigUserFriendly,
|
|
16
|
-
route
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
page = {
|
|
21
|
-
...pageConfigUserFriendly,
|
|
22
|
-
isErrorPage: true
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return [pageConfig.pageId, page];
|
|
26
|
-
}
|
|
27
|
-
function getPageConfigUserFriendly_public({ pageConfigGlobalValues, pageConfigValues }) {
|
|
28
|
-
const pageConfigUserFriendly = getPageConfigUserFriendly_base({ pageConfigGlobalValues, pageConfigValues });
|
|
29
|
-
return getPublicCopy(pageConfigUserFriendly);
|
|
30
|
-
}
|
|
31
|
-
function getPublicCopy(pageConfigUserFriendly) {
|
|
32
|
-
const p = pageConfigUserFriendly;
|
|
8
|
+
function getPageConfigUserFriendlyNew(pageConfig) {
|
|
9
|
+
const res = getPageConfigUserFriendlyV1Desin(pageConfig);
|
|
33
10
|
return {
|
|
34
|
-
config:
|
|
35
|
-
_source:
|
|
36
|
-
_sources:
|
|
37
|
-
_from:
|
|
11
|
+
config: res.config,
|
|
12
|
+
_source: res.source,
|
|
13
|
+
_sources: res.sources,
|
|
14
|
+
_from: res.from
|
|
38
15
|
};
|
|
39
16
|
}
|
|
40
|
-
function
|
|
41
|
-
const configValues = { ...pageConfigGlobalValues, ...pageConfigValues };
|
|
42
|
-
return getPageConfigUserFriendly_V1Design({ configValues });
|
|
43
|
-
}
|
|
44
|
-
function getPageConfigGlobalUserFriendly({ pageConfigGlobalValues }) {
|
|
45
|
-
const pageConfigGlobalUserFriendly = getPageConfigUserFriendly_V1Design({ configValues: pageConfigGlobalValues });
|
|
46
|
-
return getPublicCopy(pageConfigGlobalUserFriendly);
|
|
47
|
-
}
|
|
48
|
-
function getPageConfigUserFriendly_oldDesign(pageFiles, pageConfig, pageConfigGlobal) {
|
|
17
|
+
function getPageConfigUserFriendlyOld(pageFiles, pageConfig, pageConfigGlobal) {
|
|
49
18
|
const config = {};
|
|
50
19
|
const configEntries = {}; // TODO/v1-release: remove
|
|
51
20
|
const exportsAll = {}; // TODO/v1-release: remove
|
|
@@ -70,9 +39,8 @@ function getPageConfigUserFriendly_oldDesign(pageFiles, pageConfig, pageConfigGl
|
|
|
70
39
|
let sources;
|
|
71
40
|
let from;
|
|
72
41
|
if (pageConfig) {
|
|
73
|
-
const res =
|
|
74
|
-
|
|
75
|
-
pageConfigValues: pageConfig.configValues
|
|
42
|
+
const res = getPageConfigUserFriendlyV1Desin({
|
|
43
|
+
configValues: { ...pageConfigGlobal.configValues, ...pageConfig.configValues }
|
|
76
44
|
});
|
|
77
45
|
source = res.source;
|
|
78
46
|
sources = res.sources;
|
|
@@ -119,7 +87,7 @@ function getPageConfigUserFriendly_oldDesign(pageFiles, pageConfig, pageConfigGl
|
|
|
119
87
|
return pageContextExports;
|
|
120
88
|
}
|
|
121
89
|
// V1 design
|
|
122
|
-
function
|
|
90
|
+
function getPageConfigUserFriendlyV1Desin(pageConfig) {
|
|
123
91
|
const config = {};
|
|
124
92
|
const configEntries = {};
|
|
125
93
|
const exportsAll = {};
|
|
@@ -2,12 +2,11 @@ export type { PageConfigRuntimeSerialized };
|
|
|
2
2
|
export type { PageConfigGlobalRuntimeSerialized };
|
|
3
3
|
export type { ConfigValueSerialized };
|
|
4
4
|
export type { ValueSerialized };
|
|
5
|
-
import type { ConfigValueStandard, ConfigValueComputed, ConfigValueCumulative,
|
|
5
|
+
import type { ConfigValueStandard, ConfigValueComputed, ConfigValueCumulative, PageConfigRuntime } from '../PageConfig.js';
|
|
6
6
|
/** Page config data structure serialized in virtual files: parsing it results in PageConfigRuntime */
|
|
7
|
-
type PageConfigRuntimeSerialized =
|
|
7
|
+
type PageConfigRuntimeSerialized = Omit<PageConfigRuntime, 'configValues'> & {
|
|
8
8
|
/** Config values that are serializable and loaded eagerly such as config.passToClient */
|
|
9
9
|
configValuesSerialized: Record<string, ConfigValueSerialized>;
|
|
10
|
-
loadConfigValuesAll: PageConfigRuntime['loadConfigValuesAll'];
|
|
11
10
|
};
|
|
12
11
|
type PageConfigGlobalRuntimeSerialized = {
|
|
13
12
|
configValuesSerialized: Record<string, ConfigValueSerialized>;
|
|
@@ -12,9 +12,15 @@ function parsePageConfigs(pageConfigsSerialized, pageConfigGlobalSerialized) {
|
|
|
12
12
|
// pageConfigs
|
|
13
13
|
const pageConfigs = pageConfigsSerialized.map((pageConfigSerialized) => {
|
|
14
14
|
const configValues = parseConfigValuesSerialized(pageConfigSerialized.configValuesSerialized);
|
|
15
|
+
const { pageId, isErrorPage, routeFilesystem, loadConfigValuesAll } = pageConfigSerialized;
|
|
15
16
|
assertRouteConfigValue(configValues);
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
return {
|
|
18
|
+
pageId,
|
|
19
|
+
isErrorPage,
|
|
20
|
+
routeFilesystem,
|
|
21
|
+
configValues,
|
|
22
|
+
loadConfigValuesAll
|
|
23
|
+
};
|
|
18
24
|
});
|
|
19
25
|
// pageConfigsGlobal
|
|
20
26
|
const pageConfigGlobal = { configValues: {} };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { executeGuardHook };
|
|
2
|
-
import type {
|
|
2
|
+
import type { PageConfigUserFriendly, PageFile } from '../getPageFiles.js';
|
|
3
3
|
import type { PageConfigRuntime } from '../page-configs/PageConfig.js';
|
|
4
|
-
declare function executeGuardHook<T extends
|
|
4
|
+
declare function executeGuardHook<T extends PageConfigUserFriendly & {
|
|
5
5
|
pageId: string;
|
|
6
6
|
_pageFilesAll: PageFile[];
|
|
7
7
|
_pageConfigs: PageConfigRuntime[];
|
|
@@ -8,7 +8,7 @@ import { getDefinedAtString } from '../page-configs/getConfigDefinedAt.js';
|
|
|
8
8
|
import { warnDeprecatedAllowKey } from './resolveRouteFunction.js';
|
|
9
9
|
import { getHookFromPageConfigGlobal, getHookTimeoutDefault } from '../hooks/getHook.js';
|
|
10
10
|
async function loadPageRoutes(
|
|
11
|
-
// Remove all arguments and use
|
|
11
|
+
// Remove all arguments and use GlobalContext instead?
|
|
12
12
|
pageFilesAll, pageConfigs, pageConfigGlobal, allPageIds) {
|
|
13
13
|
// TODO/next-major: remove & make this function sync
|
|
14
14
|
await Promise.all(pageFilesAll.filter((p) => p.fileType === '.page.route').map((p) => p.loadFile?.()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.222
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.222";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.222
|
|
2
|
+
export const PROJECT_VERSION = '0.4.222';
|
|
@@ -22,7 +22,7 @@ function assertSingleInstance() {
|
|
|
22
22
|
const versions = unique(globalObject.instances);
|
|
23
23
|
assertUsage(versions.length <= 1,
|
|
24
24
|
// DO *NOT* patch vike to remove this error: because of multiple conflicting versions, you *will* eventually encounter insidious issues that hard to debug and potentially a security hazard, see for example https://github.com/vikejs/vike/issues/1108
|
|
25
|
-
`vike@${pc.bold(versions[0])} and vike@${pc.bold(versions[1])} loaded but
|
|
25
|
+
`vike@${pc.bold(versions[0])} and vike@${pc.bold(versions[1])} loaded but only one version should be loaded`);
|
|
26
26
|
}
|
|
27
27
|
if (globalObject.checkSingleInstance && globalObject.instances.length > 1) {
|
|
28
28
|
/*/ Not sure whether circular dependency can cause problems? In principle not since client-side code is ESM.
|