vite-plugin-vercel 0.3.1 → 0.3.2

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.
Files changed (2) hide show
  1. package/README.md +31 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -41,12 +41,42 @@ export default defineConfig({
41
41
 
42
42
  [vite-plugin-ssr](https://vite-plugin-ssr.com/) is supported through [@vite-plugin-vercel/vike](/packages/vike-integration/README.md) plugin.
43
43
 
44
- You only need to install `@vite-plugin-vercel/vike`, the config stays the same as above.
44
+ You only need to install `@vite-plugin-vercel/vike`, the Vite config stays the same as above.
45
45
 
46
46
  > [!IMPORTANT]
47
47
  > `@vite-plugin-vercel/vike` supersedes the old `@magne4000/vite-plugin-vercel-ssr` package.
48
48
  > As such, you should remove `@magne4000/vite-plugin-vercel-ssr` from your package.json and vite config file.
49
49
 
50
+ ### vite-plugin-ssr V1 design
51
+
52
+ `vite-plugin-vercel` fully supports [vite-plugin-ssr V1 design](https://vite-plugin-ssr.com/migration/v1-design),
53
+ and thus you can leverage [config files](https://vite-plugin-ssr.com/config) to customize ISR configuration:
54
+
55
+ ```ts
56
+ // /pages/product/+config.h.ts
57
+
58
+ import Page from './Page';
59
+ import type { Config } from 'vite-plugin-ssr/types';
60
+
61
+ // Customize ISR config for this page
62
+ export default {
63
+ isr: { expiration: 15 },
64
+ } satisfies Config;
65
+ ```
66
+
67
+ You will also need to extend the [renderer config](https://vite-plugin-ssr.com/config#renderer) so that `vite-plugin-ssr` is aware of the new parameter:
68
+
69
+ ```ts
70
+ // /renderer/+config.h.ts
71
+
72
+ import config from '@vite-plugin-vercel/vike/config';
73
+ import type { Config } from 'vite-plugin-ssr/types';
74
+
75
+ export default {
76
+ extends: config,
77
+ } satisfies Config;
78
+ ```
79
+
50
80
  ## Advanced usage
51
81
 
52
82
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vercel",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -22,7 +22,7 @@
22
22
  "peerDependencies": {
23
23
  "vite": "^4.2.0",
24
24
  "vite-plugin-ssr": "*",
25
- "@vite-plugin-vercel/vike": "0.3.2"
25
+ "@vite-plugin-vercel/vike": "0.3.3"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "@vite-plugin-vercel/vike": {
@@ -40,8 +40,8 @@
40
40
  "tsup": "^7.2.0",
41
41
  "typescript": "^5.2.2",
42
42
  "vite": "^4.4.9",
43
- "vite-plugin-ssr": "^0.4.140",
44
- "@vite-plugin-vercel/vike": "0.3.2"
43
+ "vite-plugin-ssr": "^0.4.141",
44
+ "@vite-plugin-vercel/vike": "0.3.3"
45
45
  },
46
46
  "dependencies": {
47
47
  "@brillout/libassert": "^0.5.8",