vite-plugin-vercel 5.0.1 → 5.0.3
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 +7 -2
- package/dist/index.cjs +6 -6
- package/dist/index.js +6 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,18 +5,23 @@ Vercel adapter for [Vite](https://vitejs.dev/).
|
|
|
5
5
|
Bundle your Vite application as supported by [Vercel Output API (v3)](https://vercel.com/docs/build-output-api/v3).
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
|
+
|
|
8
9
|
```bash
|
|
9
10
|
npm i -D vite-plugin-vercel
|
|
10
11
|
```
|
|
12
|
+
|
|
11
13
|
```bash
|
|
12
14
|
yarn add -D vite-plugin-vercel
|
|
13
15
|
```
|
|
16
|
+
|
|
14
17
|
```bash
|
|
15
18
|
pnpm add -D vite-plugin-vercel
|
|
16
19
|
```
|
|
20
|
+
|
|
17
21
|
```bash
|
|
18
22
|
bun add -D vite-plugin-vercel
|
|
19
23
|
```
|
|
24
|
+
|
|
20
25
|
## Features
|
|
21
26
|
|
|
22
27
|
- [x] [SSG/Static files](https://vercel.com/docs/build-output-api/v3/primitives#static-files)
|
|
@@ -102,7 +107,7 @@ You only need to install `@vite-plugin-vercel/vike`, the Vite config stays the s
|
|
|
102
107
|
You can then leverage [config files](https://vike.dev/config) to customize ISR configuration:
|
|
103
108
|
|
|
104
109
|
```ts
|
|
105
|
-
// /pages/product/+config.
|
|
110
|
+
// /pages/product/+config.ts
|
|
106
111
|
|
|
107
112
|
import Page from './Page';
|
|
108
113
|
import type { Config } from 'vike/types';
|
|
@@ -116,7 +121,7 @@ export default {
|
|
|
116
121
|
You will also need to extend the [renderer config](https://vike.dev/config#renderer) so that `vike` is aware of the new parameter:
|
|
117
122
|
|
|
118
123
|
```ts
|
|
119
|
-
// /renderer/+config.
|
|
124
|
+
// /renderer/+config.ts
|
|
120
125
|
|
|
121
126
|
import config from '@vite-plugin-vercel/vike/config';
|
|
122
127
|
import type { Config } from 'vike/types';
|
package/dist/index.cjs
CHANGED
|
@@ -410,12 +410,12 @@ async function buildFn(resolvedConfig, entry, buildOptions) {
|
|
|
410
410
|
options.format = "esm";
|
|
411
411
|
} else if (options.format === "esm") {
|
|
412
412
|
options.banner = {
|
|
413
|
-
js: `import { createRequire } from
|
|
414
|
-
import
|
|
415
|
-
import
|
|
416
|
-
const require =
|
|
417
|
-
const __filename =
|
|
418
|
-
const __dirname =
|
|
413
|
+
js: `import { createRequire as VPV_createRequire } from "node:module";
|
|
414
|
+
import { fileURLToPath as VPV_fileURLToPath } from "node:url";
|
|
415
|
+
import { dirname as VPV_dirname } from "node:path";
|
|
416
|
+
const require = VPV_createRequire(import.meta.url);
|
|
417
|
+
const __filename = VPV_fileURLToPath(import.meta.url);
|
|
418
|
+
const __dirname = VPV_dirname(__filename);
|
|
419
419
|
`
|
|
420
420
|
};
|
|
421
421
|
}
|
package/dist/index.js
CHANGED
|
@@ -380,12 +380,12 @@ async function buildFn(resolvedConfig, entry, buildOptions) {
|
|
|
380
380
|
options.format = "esm";
|
|
381
381
|
} else if (options.format === "esm") {
|
|
382
382
|
options.banner = {
|
|
383
|
-
js: `import { createRequire } from
|
|
384
|
-
import
|
|
385
|
-
import
|
|
386
|
-
const require =
|
|
387
|
-
const __filename =
|
|
388
|
-
const __dirname =
|
|
383
|
+
js: `import { createRequire as VPV_createRequire } from "node:module";
|
|
384
|
+
import { fileURLToPath as VPV_fileURLToPath } from "node:url";
|
|
385
|
+
import { dirname as VPV_dirname } from "node:path";
|
|
386
|
+
const require = VPV_createRequire(import.meta.url);
|
|
387
|
+
const __filename = VPV_fileURLToPath(import.meta.url);
|
|
388
|
+
const __dirname = VPV_dirname(__filename);
|
|
389
389
|
`
|
|
390
390
|
};
|
|
391
391
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-vercel",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"vike": "*",
|
|
24
24
|
"vite": "^4.4 || ^5.0.2",
|
|
25
|
-
"@vite-plugin-vercel/vike": "5.0.
|
|
25
|
+
"@vite-plugin-vercel/vike": "5.0.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"@vite-plugin-vercel/vike": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"typescript": "^5.4.2",
|
|
42
42
|
"vike": "^0.4.165",
|
|
43
43
|
"vite": "^5.1.6",
|
|
44
|
-
"@vite-plugin-vercel/vike": "5.0.
|
|
44
|
+
"@vite-plugin-vercel/vike": "5.0.2"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@brillout/libassert": "^0.5.8",
|