@vitejs/plugin-legacy 3.0.1 → 3.0.2

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
@@ -613,7 +613,7 @@ function recordAndRemovePolyfillBabelPlugin(polyfills) {
613
613
  name: "vite-remove-polyfill-import",
614
614
  post({ path: path2 }) {
615
615
  path2.get("body").forEach((p) => {
616
- if (t.isImportDeclaration(p)) {
616
+ if (t.isImportDeclaration(p.node)) {
617
617
  polyfills.add(p.node.source.value);
618
618
  p.remove();
619
619
  }
@@ -648,11 +648,11 @@ function wrapIIFEBabelPlugin() {
648
648
  };
649
649
  }
650
650
  const cspHashes = [
651
- node_crypto.createHash("sha256").update(safari10NoModuleFix).digest("base64"),
652
- node_crypto.createHash("sha256").update(systemJSInlineCode).digest("base64"),
653
- node_crypto.createHash("sha256").update(detectModernBrowserCode).digest("base64"),
654
- node_crypto.createHash("sha256").update(dynamicFallbackInlineCode).digest("base64")
655
- ];
651
+ safari10NoModuleFix,
652
+ systemJSInlineCode,
653
+ detectModernBrowserCode,
654
+ dynamicFallbackInlineCode
655
+ ].map((i) => node_crypto.createHash("sha256").update(i).digest("base64"));
656
656
 
657
657
  module.exports = viteLegacyPlugin;
658
658
  module.exports.cspHashes = cspHashes;
package/dist/index.mjs CHANGED
@@ -609,7 +609,7 @@ function recordAndRemovePolyfillBabelPlugin(polyfills) {
609
609
  name: "vite-remove-polyfill-import",
610
610
  post({ path: path2 }) {
611
611
  path2.get("body").forEach((p) => {
612
- if (t.isImportDeclaration(p)) {
612
+ if (t.isImportDeclaration(p.node)) {
613
613
  polyfills.add(p.node.source.value);
614
614
  p.remove();
615
615
  }
@@ -644,10 +644,10 @@ function wrapIIFEBabelPlugin() {
644
644
  };
645
645
  }
646
646
  const cspHashes = [
647
- createHash("sha256").update(safari10NoModuleFix).digest("base64"),
648
- createHash("sha256").update(systemJSInlineCode).digest("base64"),
649
- createHash("sha256").update(detectModernBrowserCode).digest("base64"),
650
- createHash("sha256").update(dynamicFallbackInlineCode).digest("base64")
651
- ];
647
+ safari10NoModuleFix,
648
+ systemJSInlineCode,
649
+ detectModernBrowserCode,
650
+ dynamicFallbackInlineCode
651
+ ].map((i) => createHash("sha256").update(i).digest("base64"));
652
652
 
653
653
  export { cspHashes, viteLegacyPlugin as default, detectPolyfills };
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@vitejs/plugin-legacy",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
+ "keywords": [
10
+ "frontend",
11
+ "vite",
12
+ "vite-plugin",
13
+ "@vitejs/plugin-legacy"
14
+ ],
9
15
  "main": "./dist/index.cjs",
10
16
  "module": "./dist/index.mjs",
11
17
  "types": "./dist/index.d.ts",
@@ -35,8 +41,8 @@
35
41
  },
36
42
  "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme",
37
43
  "dependencies": {
38
- "@babel/standalone": "^7.20.6",
39
- "core-js": "^3.26.1",
44
+ "@babel/standalone": "^7.20.13",
45
+ "core-js": "^3.27.2",
40
46
  "magic-string": "^0.27.0",
41
47
  "regenerator-runtime": "^0.13.11",
42
48
  "systemjs": "^6.13.0"
@@ -46,7 +52,7 @@
46
52
  "vite": "^4.0.0"
47
53
  },
48
54
  "devDependencies": {
49
- "@babel/core": "^7.20.5",
55
+ "@babel/core": "^7.20.12",
50
56
  "picocolors": "^1.0.0",
51
57
  "vite": "workspace:*"
52
58
  }