vike 0.4.218-commit-5d388ee → 0.4.218-commit-d49d717

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.
@@ -183,7 +183,7 @@ async function initGlobalContext(isProduction) {
183
183
  };
184
184
  }
185
185
  else {
186
- const buildEntry = await getBuildEntry(globalObject.outDirRoot);
186
+ const buildEntry = await getBuildEntry(globalObject.outDirRoot, isPrerendering);
187
187
  const { assetsManifest, pluginManifest } = buildEntry;
188
188
  (0, getPageFiles_js_1.setPageFiles)(buildEntry.pageFiles);
189
189
  const { globalConfig, userFiles } = await getPageRuntimeInfo(isProduction);
@@ -268,11 +268,12 @@ function eagerlyLoadUserFiles() {
268
268
  // We call it as early as possible here for better performance.
269
269
  getPageFilesExports();
270
270
  }
271
- async function getBuildEntry(outDir) {
271
+ async function getBuildEntry(outDir, isPrerendering) {
272
272
  debug('getBuildEntry()');
273
273
  if (!globalObject.buildEntry) {
274
274
  debug('importServerProductionEntry()');
275
- await (0, runtime_1.importServerProductionEntry)({ outDir });
275
+ // importServerProductionEntry() loads dist/server/entry.mjs which calls setGlobalContext_buildEntry()
276
+ await (0, runtime_1.importServerProductionEntry)({ outDir, doNotLoadServer: isPrerendering });
276
277
  if (!globalObject.buildEntry) {
277
278
  debug('globalObject.buildEntryPrevious');
278
279
  // Needed, for example, when calling the API prerender() then preview() because both trigger a importServerProductionEntry() call but only the first only is applied because of the import() cache. (A proper implementation would be to clear the import() cache, but it probably isn't possible on platforms such as Cloudflare Workers.)
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = void 0;
4
4
  // Automatically updated by @brillout/release-me
5
- exports.PROJECT_VERSION = '0.4.218-commit-5d388ee';
5
+ exports.PROJECT_VERSION = '0.4.218-commit-d49d717';
@@ -180,7 +180,7 @@ async function initGlobalContext(isProduction) {
180
180
  };
181
181
  }
182
182
  else {
183
- const buildEntry = await getBuildEntry(globalObject.outDirRoot);
183
+ const buildEntry = await getBuildEntry(globalObject.outDirRoot, isPrerendering);
184
184
  const { assetsManifest, pluginManifest } = buildEntry;
185
185
  setPageFiles(buildEntry.pageFiles);
186
186
  const { globalConfig, userFiles } = await getPageRuntimeInfo(isProduction);
@@ -265,11 +265,12 @@ function eagerlyLoadUserFiles() {
265
265
  // We call it as early as possible here for better performance.
266
266
  getPageFilesExports();
267
267
  }
268
- async function getBuildEntry(outDir) {
268
+ async function getBuildEntry(outDir, isPrerendering) {
269
269
  debug('getBuildEntry()');
270
270
  if (!globalObject.buildEntry) {
271
271
  debug('importServerProductionEntry()');
272
- await importServerProductionEntry({ outDir });
272
+ // importServerProductionEntry() loads dist/server/entry.mjs which calls setGlobalContext_buildEntry()
273
+ await importServerProductionEntry({ outDir, doNotLoadServer: isPrerendering });
273
274
  if (!globalObject.buildEntry) {
274
275
  debug('globalObject.buildEntryPrevious');
275
276
  // Needed, for example, when calling the API prerender() then preview() because both trigger a importServerProductionEntry() call but only the first only is applied because of the import() cache. (A proper implementation would be to clear the import() cache, but it probably isn't possible on platforms such as Cloudflare Workers.)
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.218-commit-5d388ee";
1
+ export declare const PROJECT_VERSION: "0.4.218-commit-d49d717";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.218-commit-5d388ee';
2
+ export const PROJECT_VERSION = '0.4.218-commit-d49d717';
@@ -1,4 +1,4 @@
1
1
  export declare const projectInfo: {
2
2
  projectName: "Vike";
3
- projectVersion: "0.4.218-commit-5d388ee";
3
+ projectVersion: "0.4.218-commit-d49d717";
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.218-commit-5d388ee",
3
+ "version": "0.4.218-commit-d49d717",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {
@@ -123,7 +123,7 @@
123
123
  "@brillout/json-serializer": "^0.5.15",
124
124
  "@brillout/picocolors": "^1.0.15",
125
125
  "@brillout/require-shim": "^0.1.2",
126
- "@brillout/vite-plugin-server-entry": "^0.5.6",
126
+ "@brillout/vite-plugin-server-entry": "0.5.7-commit-123be7e",
127
127
  "acorn": "^8.0.0",
128
128
  "cac": "^6.0.0",
129
129
  "es-module-lexer": "^1.0.0",