vite-plugin-vercel 2.0.1 → 3.0.0

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/README.md CHANGED
@@ -86,10 +86,7 @@ You only need to install `@vite-plugin-vercel/vike`, the Vite config stays the s
86
86
  > `@vite-plugin-vercel/vike` supersedes the old `@magne4000/vite-plugin-vercel-ssr` package.
87
87
  > As such, you should remove `@magne4000/vite-plugin-vercel-ssr` from your package.json and vite config file.
88
88
 
89
- ### vike V1 design
90
-
91
- `vite-plugin-vercel` fully supports [vike V1 design](https://vike.dev/migration/v1-design),
92
- and thus you can leverage [config files](https://vike.dev/config) to customize ISR configuration:
89
+ You can then leverage [config files](https://vike.dev/config) to customize ISR configuration:
93
90
 
94
91
  ```ts
95
92
  // /pages/product/+config.h.ts
package/dist/index.cjs CHANGED
@@ -493,29 +493,29 @@ async function buildEndpoints(resolvedConfig) {
493
493
  const entries = getEntries(resolvedConfig);
494
494
  for (const entry of entries) {
495
495
  if (typeof entry.source === "string") {
496
- const exports = await extractExports(entry.source);
497
- if (exports) {
498
- if (entry.headers || exports.headers) {
496
+ const exports2 = await extractExports(entry.source);
497
+ if (exports2) {
498
+ if (entry.headers || exports2.headers) {
499
499
  entry.headers = {
500
- ...exports.headers,
500
+ ...exports2.headers,
501
501
  ...entry.headers
502
502
  };
503
503
  }
504
- if (entry.edge !== void 0 && exports.edge !== void 0) {
504
+ if (entry.edge !== void 0 && exports2.edge !== void 0) {
505
505
  throw new Error(
506
506
  `edge configuration should be defined either in the endpoint itself or through Vite config, not both ('${entry.source}')`
507
507
  );
508
508
  }
509
- if (exports.edge !== void 0) {
510
- entry.edge = exports.edge;
509
+ if (exports2.edge !== void 0) {
510
+ entry.edge = exports2.edge;
511
511
  }
512
- if (entry.isr !== void 0 && exports.isr !== void 0) {
512
+ if (entry.isr !== void 0 && exports2.isr !== void 0) {
513
513
  throw new Error(
514
514
  `isr configuration should be defined either in the endpoint itself or through Vite config, not both ('${entry.source}')`
515
515
  );
516
516
  }
517
- if (exports.isr) {
518
- entry.isr = exports.isr;
517
+ if (exports2.isr) {
518
+ entry.isr = exports2.isr;
519
519
  }
520
520
  }
521
521
  }
package/dist/index.d.cts CHANGED
@@ -653,4 +653,4 @@ declare function allPlugins(options?: {
653
653
  smart?: boolean;
654
654
  }): PluginOption[];
655
655
 
656
- export { VercelOutputConfig, VercelOutputIsr, VercelOutputPrerenderConfig, VercelOutputVcConfig, ViteVercelApiEntry, ViteVercelConfig, ViteVercelPrerenderFn, ViteVercelPrerenderRoute, ViteVercelRedirect, ViteVercelRewrite, allPlugins as default };
656
+ export { type VercelOutputConfig, type VercelOutputIsr, type VercelOutputPrerenderConfig, type VercelOutputVcConfig, type ViteVercelApiEntry, type ViteVercelConfig, type ViteVercelPrerenderFn, type ViteVercelPrerenderRoute, type ViteVercelRedirect, type ViteVercelRewrite, allPlugins as default };
package/dist/index.d.ts CHANGED
@@ -653,4 +653,4 @@ declare function allPlugins(options?: {
653
653
  smart?: boolean;
654
654
  }): PluginOption[];
655
655
 
656
- export { VercelOutputConfig, VercelOutputIsr, VercelOutputPrerenderConfig, VercelOutputVcConfig, ViteVercelApiEntry, ViteVercelConfig, ViteVercelPrerenderFn, ViteVercelPrerenderRoute, ViteVercelRedirect, ViteVercelRewrite, allPlugins as default };
656
+ export { type VercelOutputConfig, type VercelOutputIsr, type VercelOutputPrerenderConfig, type VercelOutputVcConfig, type ViteVercelApiEntry, type ViteVercelConfig, type ViteVercelPrerenderFn, type ViteVercelPrerenderRoute, type ViteVercelRedirect, type ViteVercelRewrite, allPlugins as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vercel",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -22,7 +22,7 @@
22
22
  "peerDependencies": {
23
23
  "vike": "*",
24
24
  "vite": "^4.2.0",
25
- "@vite-plugin-vercel/vike": "2.0.0"
25
+ "@vite-plugin-vercel/vike": "3.0.0"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "@vite-plugin-vercel/vike": {
@@ -33,24 +33,24 @@
33
33
  }
34
34
  },
35
35
  "devDependencies": {
36
- "@types/node": "^16.18.58",
37
- "@typescript-eslint/eslint-plugin": "^6.7.5",
38
- "@typescript-eslint/parser": "^6.7.5",
39
- "eslint": "^8.51.0",
40
- "tsup": "^7.2.0",
41
- "typescript": "^5.2.2",
42
- "vike": "^0.4.143",
43
- "vite": "^4.4.11",
44
- "@vite-plugin-vercel/vike": "2.0.0"
36
+ "@types/node": "^16.18.71",
37
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
38
+ "@typescript-eslint/parser": "^6.19.0",
39
+ "eslint": "^8.56.0",
40
+ "tsup": "^8.0.1",
41
+ "typescript": "^5.3.3",
42
+ "vike": "^0.4.157",
43
+ "vite": "^5.0.11",
44
+ "@vite-plugin-vercel/vike": "3.0.0"
45
45
  },
46
46
  "dependencies": {
47
47
  "@brillout/libassert": "^0.5.8",
48
- "@vercel/build-utils": "^7.2.2",
49
- "@vercel/routing-utils": "^3.0.0",
50
- "esbuild": "^0.19.4",
48
+ "@vercel/build-utils": "^7.5.0",
49
+ "@vercel/routing-utils": "^3.1.0",
50
+ "esbuild": "^0.19.11",
51
51
  "eval": "^0.1.8",
52
- "fast-glob": "^3.3.1",
53
- "magicast": "^0.3.0",
52
+ "fast-glob": "^3.3.2",
53
+ "magicast": "^0.3.3",
54
54
  "zod": "^3.22.4"
55
55
  },
56
56
  "scripts": {