vite-plugin-vercel 5.0.4 → 5.0.5

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/dist/index.cjs CHANGED
@@ -537,6 +537,11 @@ async function extractExports(filepath) {
537
537
  loader: filepath.endsWith(".ts") ? "ts" : filepath.endsWith(".tsx") ? "tsx" : filepath.endsWith(".js") ? "js" : filepath.endsWith(".jsx") ? "jsx" : "default",
538
538
  resolveDir: (0, import_path3.dirname)(filepath)
539
539
  };
540
+ buildOptions.banner = {
541
+ js: `const __filename = ${JSON.stringify(filepath)};
542
+ const __dirname = ${JSON.stringify((0, import_path3.dirname)(filepath))};
543
+ `
544
+ };
540
545
  const output = await (0, import_esbuild.build)(buildOptions);
541
546
  const bundle = new TextDecoder().decode((_a = output.outputFiles[0]) == null ? void 0 : _a.contents);
542
547
  return vercelEndpointExports.parse((0, import_eval.default)(bundle, filepath, {}, true));
package/dist/index.js CHANGED
@@ -507,6 +507,11 @@ async function extractExports(filepath) {
507
507
  loader: filepath.endsWith(".ts") ? "ts" : filepath.endsWith(".tsx") ? "tsx" : filepath.endsWith(".js") ? "js" : filepath.endsWith(".jsx") ? "jsx" : "default",
508
508
  resolveDir: dirname(filepath)
509
509
  };
510
+ buildOptions.banner = {
511
+ js: `const __filename = ${JSON.stringify(filepath)};
512
+ const __dirname = ${JSON.stringify(dirname(filepath))};
513
+ `
514
+ };
510
515
  const output = await build(buildOptions);
511
516
  const bundle = new TextDecoder().decode((_a = output.outputFiles[0]) == null ? void 0 : _a.contents);
512
517
  return vercelEndpointExports.parse(_eval(bundle, filepath, {}, true));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vercel",
3
- "version": "5.0.4",
3
+ "version": "5.0.5",
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.2"
25
+ "@vite-plugin-vercel/vike": "5.0.3"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "@vite-plugin-vercel/vike": {
@@ -34,19 +34,19 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^16.18.76",
37
- "@typescript-eslint/eslint-plugin": "^7.3.1",
38
- "@typescript-eslint/parser": "^7.3.1",
37
+ "@typescript-eslint/eslint-plugin": "^7.5.0",
38
+ "@typescript-eslint/parser": "^7.5.0",
39
39
  "eslint": "^8.57.0",
40
40
  "tsup": "^8.0.2",
41
41
  "typescript": "^5.4.3",
42
- "vike": "^0.4.167",
43
- "vite": "^5.2.6",
44
- "@vite-plugin-vercel/vike": "5.0.2"
42
+ "vike": "^0.4.168",
43
+ "vite": "^5.2.7",
44
+ "@vite-plugin-vercel/vike": "5.0.3"
45
45
  },
46
46
  "dependencies": {
47
47
  "@brillout/libassert": "^0.5.8",
48
48
  "@manypkg/find-root": "^2.2.1",
49
- "@vercel/build-utils": "^7.9.1",
49
+ "@vercel/build-utils": "^7.10.0",
50
50
  "@vercel/nft": "^0.26.4",
51
51
  "@vercel/routing-utils": "^3.1.0",
52
52
  "esbuild": "^0.20.2",