@vitejs/plugin-legacy 2.3.0 → 3.0.0-alpha.0

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
@@ -273,7 +273,7 @@ function viteLegacyPlugin(options = {}) {
273
273
  if (!genLegacy || config.build.ssr) {
274
274
  return;
275
275
  }
276
- const getLegacyOutputFileName = (fileNames, defaultFileName = "[name]-legacy.[hash].js") => {
276
+ const getLegacyOutputFileName = (fileNames, defaultFileName = "[name]-legacy-[hash].js") => {
277
277
  if (!fileNames) {
278
278
  return path.posix.join(config.build.assetsDir, defaultFileName);
279
279
  }
@@ -350,7 +350,7 @@ function viteLegacyPlugin(options = {}) {
350
350
  configFile: false,
351
351
  compact: !!config.build.minify,
352
352
  sourceMaps,
353
- inputSourceMap: sourceMaps ? chunk.map : void 0,
353
+ inputSourceMap: void 0,
354
354
  presets: [
355
355
  [
356
356
  () => ({
@@ -589,7 +589,7 @@ function polyfillsPlugin(imports, excludeSystemJS) {
589
589
  },
590
590
  load(id) {
591
591
  if (id === polyfillId) {
592
- return [...imports].map((i) => `import "${i}";`).join("") + (excludeSystemJS ? "" : `import "systemjs/dist/s.min.js";`);
592
+ return [...imports].map((i) => `import ${JSON.stringify(i)};`).join("") + (excludeSystemJS ? "" : `import "systemjs/dist/s.min.js";`);
593
593
  }
594
594
  }
595
595
  };
package/dist/index.mjs CHANGED
@@ -269,7 +269,7 @@ function viteLegacyPlugin(options = {}) {
269
269
  if (!genLegacy || config.build.ssr) {
270
270
  return;
271
271
  }
272
- const getLegacyOutputFileName = (fileNames, defaultFileName = "[name]-legacy.[hash].js") => {
272
+ const getLegacyOutputFileName = (fileNames, defaultFileName = "[name]-legacy-[hash].js") => {
273
273
  if (!fileNames) {
274
274
  return path.posix.join(config.build.assetsDir, defaultFileName);
275
275
  }
@@ -346,7 +346,7 @@ function viteLegacyPlugin(options = {}) {
346
346
  configFile: false,
347
347
  compact: !!config.build.minify,
348
348
  sourceMaps,
349
- inputSourceMap: sourceMaps ? chunk.map : void 0,
349
+ inputSourceMap: void 0,
350
350
  presets: [
351
351
  [
352
352
  () => ({
@@ -585,7 +585,7 @@ function polyfillsPlugin(imports, excludeSystemJS) {
585
585
  },
586
586
  load(id) {
587
587
  if (id === polyfillId) {
588
- return [...imports].map((i) => `import "${i}";`).join("") + (excludeSystemJS ? "" : `import "systemjs/dist/s.min.js";`);
588
+ return [...imports].map((i) => `import ${JSON.stringify(i)};`).join("") + (excludeSystemJS ? "" : `import "systemjs/dist/s.min.js";`);
589
589
  }
590
590
  }
591
591
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitejs/plugin-legacy",
3
- "version": "2.3.0",
3
+ "version": "3.0.0-alpha.0",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "files": [
@@ -35,10 +35,10 @@
35
35
  },
36
36
  "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme",
37
37
  "dependencies": {
38
- "@babel/standalone": "^7.19.6",
39
- "core-js": "^3.26.0",
38
+ "@babel/standalone": "^7.20.6",
39
+ "core-js": "^3.26.1",
40
40
  "magic-string": "^0.26.7",
41
- "regenerator-runtime": "^0.13.10",
41
+ "regenerator-runtime": "^0.13.11",
42
42
  "systemjs": "^6.13.0"
43
43
  },
44
44
  "peerDependencies": {
@@ -46,7 +46,7 @@
46
46
  "vite": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@babel/core": "^7.19.6",
49
+ "@babel/core": "^7.20.5",
50
50
  "picocolors": "^1.0.0",
51
51
  "vite": "workspace:*"
52
52
  }