vite-plugin-vercel 11.0.0-beta.4 → 11.0.0-beta.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.
Files changed (2) hide show
  1. package/dist/vite.js +8 -5
  2. package/package.json +1 -1
package/dist/vite.js CHANGED
@@ -216,7 +216,8 @@ async function bundle$1(pluginContext, bundledAssets, outfile) {
216
216
  const buildOptions = {};
217
217
  buildOptions.output = {
218
218
  format: "esm",
219
- legalComments: "none"
219
+ legalComments: "none",
220
+ inlineDynamicImports: true
220
221
  };
221
222
  buildOptions.checks = { pluginTimings: false };
222
223
  buildOptions.input = [source];
@@ -684,13 +685,13 @@ function setupEnvs(pluginConfig) {
684
685
  buildApp: {
685
686
  order: "post",
686
687
  async handler(builder) {
687
- try {
688
+ if (!builder.environments[envNames.client].isBuilt) try {
688
689
  await builder.build(builder.environments[envNames.client]);
689
690
  } catch (e) {
690
691
  if (e instanceof Error && e.message.includes(`Could not resolve entry module "index.html"`)) {} else throw e;
691
692
  }
692
- if (envNames.edge !== false) await builder.build(builder.environments[envNames.edge]);
693
- await builder.build(builder.environments[envNames.node]);
693
+ if (envNames.edge !== false && !builder.environments[envNames.edge].isBuilt) await builder.build(builder.environments[envNames.edge]);
694
+ if (!builder.environments[envNames.node].isBuilt) await builder.build(builder.environments[envNames.node]);
694
695
  }
695
696
  },
696
697
  config: {
@@ -818,7 +819,9 @@ function createVercelEnvironmentOptions(overrides) {
818
819
  rollupOptions: {
819
820
  input: getDummyInput(),
820
821
  output: {
821
- sanitizeFileName: false,
822
+ sanitizeFileName: (filename) => {
823
+ return filename.replace("\0", "_");
824
+ },
822
825
  sourcemap: false
823
826
  }
824
827
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vercel",
3
- "version": "11.0.0-beta.4",
3
+ "version": "11.0.0-beta.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",