vike 0.4.151-commit-19bc995 → 0.4.152-commit-3d25618

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.
@@ -46,7 +46,8 @@ function collectCss(mod, styleUrls, visitedModules, importer) {
46
46
  // - I believe some Vite plugins don't respect the \0 virtual module convention. What should we do then?
47
47
  // - https://github.com/vikejs/vike/issues/1327
48
48
  // - https://github.com/vikejs/vike/commit/3f7b9916dddc84e29e2c20d2b0df7211b6f1acbd
49
- styleUrls.add(`/@id/${mod.url.substring(1)}`);
49
+ // - https://github.com/vikejs/vike/issues/479#issuecomment-1870043943
50
+ styleUrls.add(`/@id/__x00__${mod.url.substring(1)}`);
50
51
  }
51
52
  else {
52
53
  // Is this useful? Maybe for virtual modules that don't respect the \0 virtual module convention?
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = exports.projectInfo = void 0;
4
4
  const assertSingleInstance_js_1 = require("./assertSingleInstance.js");
5
- const PROJECT_VERSION = '0.4.151-commit-19bc995';
5
+ const PROJECT_VERSION = '0.4.152-commit-3d25618';
6
6
  exports.PROJECT_VERSION = PROJECT_VERSION;
7
7
  const projectInfo = {
8
8
  projectName: 'Vike',
@@ -43,7 +43,8 @@ function collectCss(mod, styleUrls, visitedModules, importer) {
43
43
  // - I believe some Vite plugins don't respect the \0 virtual module convention. What should we do then?
44
44
  // - https://github.com/vikejs/vike/issues/1327
45
45
  // - https://github.com/vikejs/vike/commit/3f7b9916dddc84e29e2c20d2b0df7211b6f1acbd
46
- styleUrls.add(`/@id/${mod.url.substring(1)}`);
46
+ // - https://github.com/vikejs/vike/issues/479#issuecomment-1870043943
47
+ styleUrls.add(`/@id/__x00__${mod.url.substring(1)}`);
47
48
  }
48
49
  else {
49
50
  // Is this useful? Maybe for virtual modules that don't respect the \0 virtual module convention?
@@ -66,17 +66,21 @@ type GuardSync = (pageContext: PageContextServer) => void;
66
66
  *
67
67
  * https://vike.dev/onBeforePrerenderStart
68
68
  */
69
- type OnBeforePrerenderStartAsync = () => Promise<(string | {
69
+ type OnBeforePrerenderStartAsync<Data = unknown> = () => Promise<(string | {
70
70
  url: string;
71
- pageContext: Partial<Vike.PageContext>;
71
+ pageContext: Partial<Vike.PageContext & {
72
+ data: Data;
73
+ }>;
72
74
  })[]>;
73
75
  /** Global Hook called before the whole pre-rendering process starts.
74
76
  *
75
77
  * https://vike.dev/onBeforePrerenderStart
76
78
  */
77
- type OnBeforePrerenderStartSync = () => (string | {
79
+ type OnBeforePrerenderStartSync<Data = unknown> = () => (string | {
78
80
  url: string;
79
- pageContext: Partial<Vike.PageContext>;
81
+ pageContext: Partial<Vike.PageContext & {
82
+ data: Data;
83
+ }>;
80
84
  })[];
81
85
  /** Hook called before the page is rendered.
82
86
  *
@@ -213,10 +217,6 @@ type RouteSync = (pageContext: PageContextServer | PageContextClient) => {
213
217
  routeParams?: Record<string, string>;
214
218
  precedence?: number;
215
219
  } | boolean;
216
- /** The page's URL(s).
217
- *
218
- * https://vike.dev/route
219
- */
220
220
  /** Page configuration.
221
221
  *
222
222
  * https://vike.dev/config
@@ -1,13 +1,13 @@
1
1
  export { projectInfo };
2
2
  export type { ProjectTag };
3
3
  export { PROJECT_VERSION };
4
- declare const PROJECT_VERSION: "0.4.151-commit-19bc995";
4
+ declare const PROJECT_VERSION: "0.4.152-commit-3d25618";
5
5
  type PackageName = typeof projectInfo.npmPackageName;
6
6
  type ProjectVersion = typeof projectInfo.projectVersion;
7
7
  type ProjectTag = `[${PackageName}]` | `[${PackageName}@${ProjectVersion}]`;
8
8
  declare const projectInfo: {
9
9
  projectName: "Vike";
10
- projectVersion: "0.4.151-commit-19bc995";
10
+ projectVersion: "0.4.152-commit-3d25618";
11
11
  npmPackageName: "vike";
12
12
  githubRepository: "https://github.com/vikejs/vike";
13
13
  };
@@ -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.151-commit-19bc995';
4
+ const PROJECT_VERSION = '0.4.152-commit-3d25618';
5
5
  const projectInfo = {
6
6
  projectName: 'Vike',
7
7
  projectVersion: PROJECT_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.151-commit-19bc995",
3
+ "version": "0.4.152-commit-3d25618",
4
4
  "scripts": {
5
5
  "dev": "tsc --watch",
6
6
  "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",