vite-plugin-vercel 11.0.0-beta.5 → 11.0.0-beta.7

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/dist/vite.js +8 -2
  2. package/package.json +1 -1
package/dist/vite.js CHANGED
@@ -69,7 +69,12 @@ function removeExtension$1(subject) {
69
69
  //#endregion
70
70
  //#region src/utils/destination.ts
71
71
  function entryDestinationDefault(root, entry) {
72
- return `${removeExtension$1(pathRelativeTo$1(entry.id, root)).replace(/[^a-zA-Z0-9\-_[\]/]/g, "-")}`;
72
+ let rel = pathRelativeTo$1(entry.id, root);
73
+ if (rel.includes("node_modules")) {
74
+ const split = rel.split("node_modules");
75
+ rel = split[split.length - 1];
76
+ }
77
+ return `${removeExtension$1(rel).replace(/[^a-zA-Z0-9\-_[\]/]/g, "-")}`;
73
78
  }
74
79
  function entryDestination(root, entry, postfix) {
75
80
  return `${path.posix.join("functions/", entryDestinationDefault(root, entry))}${postfix}`;
@@ -165,6 +170,7 @@ const reactEdgePlugin$1 = {
165
170
  }
166
171
  };
167
172
  function basicBundlePlugin(pluginConfig) {
173
+ const envNames = getBuildEnvNames(pluginConfig);
168
174
  const bundledAssets = /* @__PURE__ */ new Map();
169
175
  const bundledChunks = [];
170
176
  return [{
@@ -184,7 +190,7 @@ function basicBundlePlugin(pluginConfig) {
184
190
  fileName: b.fileName
185
191
  };
186
192
  for (const originalFileName of originalFileNames) bundledAssets.set(originalFileName, asset);
187
- } else bundledChunks.push(outFile);
193
+ } else if (this.environment.name === envNames.edge || this.environment.name === envNames.node) bundledChunks.push(outFile);
188
194
  }
189
195
  },
190
196
  closeBundle: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vercel",
3
- "version": "11.0.0-beta.5",
3
+ "version": "11.0.0-beta.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",