vike 0.4.162 → 0.4.163
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/plugins/buildConfig.js +21 -17
- package/dist/cjs/node/plugin/plugins/commonConfig.js +8 -2
- package/dist/cjs/node/plugin/plugins/importBuild/index.js +2 -3
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +6 -1
- package/dist/cjs/node/runtime/globalContext/loadImportBuild.js +3 -3
- package/dist/cjs/node/runtime/globalContext.js +47 -6
- package/dist/cjs/node/runtime/index-common.js +4 -1
- package/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js +19 -19
- package/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js +12 -12
- package/dist/cjs/node/runtime/renderPage/getPageAssets.js +5 -5
- package/dist/cjs/node/runtime/renderPage/logErrorHint.js +7 -0
- package/dist/cjs/node/runtime/renderPage.js +3 -0
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValue.js +4 -11
- package/dist/cjs/utils/projectInfo.js +1 -1
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.js +20 -14
- package/dist/esm/client/shared/getPageContextProxyForUser.js +19 -2
- package/dist/esm/node/plugin/plugins/buildConfig.js +21 -17
- package/dist/esm/node/plugin/plugins/commonConfig.js +9 -3
- package/dist/esm/node/plugin/plugins/importBuild/index.js +2 -3
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +6 -1
- package/dist/esm/node/runtime/globalContext/loadImportBuild.d.ts +2 -2
- package/dist/esm/node/runtime/globalContext/loadImportBuild.js +3 -3
- package/dist/esm/node/runtime/globalContext.d.ts +11 -2
- package/dist/esm/node/runtime/globalContext.js +49 -6
- package/dist/esm/node/runtime/index-common.d.ts +1 -0
- package/dist/esm/node/runtime/index-common.js +1 -0
- package/dist/esm/node/runtime/renderPage/getPageAssets/getManifestEntry.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/getPageAssets/getManifestEntry.js +19 -19
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js +12 -12
- package/dist/esm/node/runtime/renderPage/getPageAssets.js +5 -5
- package/dist/esm/node/runtime/renderPage/logErrorHint.js +7 -0
- package/dist/esm/node/runtime/renderPage.js +3 -0
- package/dist/esm/shared/page-configs/PageConfig.d.ts +1 -0
- package/dist/esm/shared/page-configs/serialize/serializeConfigValue.js +5 -9
- package/dist/esm/utils/projectInfo.d.ts +2 -2
- package/dist/esm/utils/projectInfo.js +1 -1
- package/package.json +1 -1
|
@@ -6,8 +6,7 @@ export { serializeConfigValueImported };
|
|
|
6
6
|
// Both parsePageConfigs() parseConfigValuesImported() and are loaded on the client-side and server-side
|
|
7
7
|
import { assertIsNotProductionRuntime } from '../../../utils/assertIsNotProductionRuntime.js';
|
|
8
8
|
assertIsNotProductionRuntime();
|
|
9
|
-
import
|
|
10
|
-
import { assert, assertPosixPath } from '../../utils.js';
|
|
9
|
+
import { assert } from '../../utils.js';
|
|
11
10
|
import { generateEagerImport } from '../../../node/plugin/plugins/importUserCode/generateEagerImport.js';
|
|
12
11
|
function serializeConfigValue(lines, configName, configValueSerialized) {
|
|
13
12
|
let whitespace = ' ';
|
|
@@ -23,13 +22,10 @@ function serializeConfigValue(lines, configName, configValueSerialized) {
|
|
|
23
22
|
function serializeConfigValueImported(configValueSource, configName, whitespace, varCounterContainer, importStatements) {
|
|
24
23
|
assert(!configValueSource.valueIsFilePath);
|
|
25
24
|
assert(whitespace.replaceAll(' ', '').length === 0);
|
|
26
|
-
const { valueIsImportedAtRuntime, definedAt } = configValueSource;
|
|
25
|
+
const { valueIsImportedAtRuntime, valueIsDefinedByValueFile, definedAt } = configValueSource;
|
|
27
26
|
assert(valueIsImportedAtRuntime);
|
|
28
27
|
const { filePathAbsoluteVite, fileExportName } = definedAt;
|
|
29
|
-
|
|
30
|
-
const fileName = path.posix.basename(filePathAbsoluteVite);
|
|
31
|
-
const isValueFile = fileName.startsWith('+');
|
|
32
|
-
if (isValueFile)
|
|
28
|
+
if (valueIsDefinedByValueFile)
|
|
33
29
|
assert(fileExportName === undefined);
|
|
34
30
|
const { importName, importStatement } = generateEagerImport(filePathAbsoluteVite, varCounterContainer.varCounter++, fileExportName);
|
|
35
31
|
importStatements.push(importStatement);
|
|
@@ -37,8 +33,8 @@ function serializeConfigValueImported(configValueSource, configName, whitespace,
|
|
|
37
33
|
lines.push(` {`);
|
|
38
34
|
lines.push(` configName: '${configName}',`);
|
|
39
35
|
lines.push(` importPath: '${filePathAbsoluteVite}',`);
|
|
40
|
-
lines.push(` isValueFile: ${JSON.stringify(
|
|
41
|
-
if (
|
|
36
|
+
lines.push(` isValueFile: ${JSON.stringify(valueIsDefinedByValueFile)},`);
|
|
37
|
+
if (valueIsDefinedByValueFile) {
|
|
42
38
|
lines.push(` exportValues: ${importName},`);
|
|
43
39
|
}
|
|
44
40
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { projectInfo };
|
|
2
2
|
export { PROJECT_VERSION };
|
|
3
3
|
import { onProjectInfo } from './assertSingleInstance.js';
|
|
4
|
-
const PROJECT_VERSION = '0.4.
|
|
4
|
+
const PROJECT_VERSION = '0.4.163';
|
|
5
5
|
const projectInfo = {
|
|
6
6
|
projectName: 'Vike',
|
|
7
7
|
projectVersion: PROJECT_VERSION
|