vike 0.4.176-commit-03270e7 → 0.4.176-commit-1442a4a

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.
@@ -115,7 +115,7 @@ const configDefinitionsBuiltIn = {
115
115
  exports.configDefinitionsBuiltIn = configDefinitionsBuiltIn;
116
116
  const configDefinitionsBuiltInGlobal = {
117
117
  onPrerenderStart: {
118
- env: { server: true, production: true }
118
+ env: { server: true, production: true, eager: true }
119
119
  },
120
120
  onBeforeRoute: {
121
121
  env: { server: true, client: 'if-client-routing', eager: true }
@@ -10,15 +10,13 @@ function assertV1Design(pageConfigs, pageFilesAll) {
10
10
  const indent = '- ';
11
11
  if (typeof pageConfigs !== 'boolean') {
12
12
  (0, utils_js_1.assert)(pageConfigs.length > 0);
13
- if (pageConfigs.length) {
14
- const filesV1 = (0, utils_js_1.unique)(pageConfigs
15
- .map((p) => Object.values(p.configValueSources).map((sources) => sources
16
- .map((c) => c.definedAtFilePath.filePathAbsoluteUserRootDir)
17
- .filter(utils_js_1.isNotNullish)
18
- .map((filePathToShowToUser) => indent + filePathToShowToUser)))
19
- .flat(2));
20
- lines.push(...['V1 design files:', ...filesV1]);
21
- }
13
+ const filesV1 = (0, utils_js_1.unique)(pageConfigs
14
+ .map((p) => Object.values(p.configValueSources).map((sources) => sources
15
+ .map((c) => c.definedAtFilePath.filePathAbsoluteUserRootDir)
16
+ .filter(utils_js_1.isNotNullish)
17
+ .map((filePathToShowToUser) => indent + filePathToShowToUser)))
18
+ .flat(2));
19
+ lines.push(...['V1 design files:', ...filesV1]);
22
20
  }
23
21
  if (typeof pageFilesAll !== 'boolean') {
24
22
  (0, utils_js_1.assert)(pageFilesAll.length > 0);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = exports.projectInfo = void 0;
4
- const PROJECT_VERSION = '0.4.176-commit-03270e7';
4
+ const PROJECT_VERSION = '0.4.176-commit-1442a4a';
5
5
  exports.PROJECT_VERSION = PROJECT_VERSION;
6
6
  const projectInfo = {
7
7
  projectName: 'Vike',
@@ -3,7 +3,7 @@ export { autoSaveScrollPosition };
3
3
  export type { ScrollTarget };
4
4
  import { type ScrollPosition } from './history.js';
5
5
  type ScrollTarget = undefined | {
6
- preserveScroll?: boolean;
6
+ preserveScroll: boolean;
7
7
  } | ScrollPosition;
8
8
  declare function setScrollPosition(scrollTarget: ScrollTarget): void;
9
9
  declare function autoSaveScrollPosition(): void;
@@ -3,13 +3,11 @@ export { autoSaveScrollPosition };
3
3
  import { assert, onPageHide, sleep, throttle } from './utils.js';
4
4
  import { saveScrollPosition } from './history.js';
5
5
  function setScrollPosition(scrollTarget) {
6
- if (!scrollTarget)
7
- scrollTarget = {};
8
- if ('x' in scrollTarget) {
6
+ if (scrollTarget && 'x' in scrollTarget) {
9
7
  setScroll(scrollTarget);
10
8
  return;
11
9
  }
12
- if (scrollTarget.preserveScroll) {
10
+ if (scrollTarget?.preserveScroll) {
13
11
  return;
14
12
  }
15
13
  scrollToTopOrHash();
@@ -113,7 +113,7 @@ const configDefinitionsBuiltIn = {
113
113
  };
114
114
  const configDefinitionsBuiltInGlobal = {
115
115
  onPrerenderStart: {
116
- env: { server: true, production: true }
116
+ env: { server: true, production: true, eager: true }
117
117
  },
118
118
  onBeforeRoute: {
119
119
  env: { server: true, client: 'if-client-routing', eager: true }
@@ -8,15 +8,13 @@ function assertV1Design(pageConfigs, pageFilesAll) {
8
8
  const indent = '- ';
9
9
  if (typeof pageConfigs !== 'boolean') {
10
10
  assert(pageConfigs.length > 0);
11
- if (pageConfigs.length) {
12
- const filesV1 = unique(pageConfigs
13
- .map((p) => Object.values(p.configValueSources).map((sources) => sources
14
- .map((c) => c.definedAtFilePath.filePathAbsoluteUserRootDir)
15
- .filter(isNotNullish)
16
- .map((filePathToShowToUser) => indent + filePathToShowToUser)))
17
- .flat(2));
18
- lines.push(...['V1 design files:', ...filesV1]);
19
- }
11
+ const filesV1 = unique(pageConfigs
12
+ .map((p) => Object.values(p.configValueSources).map((sources) => sources
13
+ .map((c) => c.definedAtFilePath.filePathAbsoluteUserRootDir)
14
+ .filter(isNotNullish)
15
+ .map((filePathToShowToUser) => indent + filePathToShowToUser)))
16
+ .flat(2));
17
+ lines.push(...['V1 design files:', ...filesV1]);
20
18
  }
21
19
  if (typeof pageFilesAll !== 'boolean') {
22
20
  assert(pageFilesAll.length > 0);
@@ -1,7 +1,7 @@
1
1
  export { projectInfo };
2
2
  export { PROJECT_VERSION };
3
- declare const PROJECT_VERSION: "0.4.176-commit-03270e7";
3
+ declare const PROJECT_VERSION: "0.4.176-commit-1442a4a";
4
4
  declare const projectInfo: {
5
5
  projectName: "Vike";
6
- projectVersion: "0.4.176-commit-03270e7";
6
+ projectVersion: "0.4.176-commit-1442a4a";
7
7
  };
@@ -1,6 +1,6 @@
1
1
  export { projectInfo };
2
2
  export { PROJECT_VERSION };
3
- const PROJECT_VERSION = '0.4.176-commit-03270e7';
3
+ const PROJECT_VERSION = '0.4.176-commit-1442a4a';
4
4
  const projectInfo = {
5
5
  projectName: 'Vike',
6
6
  projectVersion: PROJECT_VERSION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.176-commit-03270e7",
3
+ "version": "0.4.176-commit-1442a4a",
4
4
  "scripts": {
5
5
  "dev": "tsc --watch",
6
6
  "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",