]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-vapor): swc minify error
author三咲智子 Kevin Deng <sxzz@sxzz.moe>
Tue, 17 Sep 2024 08:12:58 +0000 (16:12 +0800)
committer三咲智子 Kevin Deng <sxzz@sxzz.moe>
Tue, 17 Sep 2024 08:26:31 +0000 (16:26 +0800)
benchmark/index.js
benchmark/package.json
packages/runtime-vapor/src/dom/element.ts
pnpm-lock.yaml

index 322c58af99da2174c2bc47f2bd6eef29a78b4007..55656d709361ea4e14e28c648bb9ba5ef413eb92 100644 (file)
@@ -92,11 +92,11 @@ async function buildLib() {
     cwd: path.resolve(import.meta.dirname, '..'),
     stdio: 'inherit',
   }
-  const BuildOptions = devBuild ? '-df' : '-pf'
+  const buildOptions = devBuild ? '-df' : '-pf'
   const [{ ok }, { ok: ok2 }, { ok: ok3 }, { ok: ok4 }] = await Promise.all([
     exec(
       'pnpm',
-      `run --silent build shared compiler-core compiler-dom compiler-vapor ${BuildOptions} cjs`.split(
+      `run --silent build shared compiler-core compiler-dom compiler-vapor ${buildOptions} cjs`.split(
         ' ',
       ),
       options,
@@ -108,12 +108,12 @@ async function buildLib() {
     ),
     exec(
       'pnpm',
-      `run --silent build vue-vapor ${BuildOptions} esm-browser`.split(' '),
+      `run --silent build vue-vapor ${buildOptions} esm-browser`.split(' '),
       options,
     ),
     exec(
       'pnpm',
-      `run --silent build vue ${BuildOptions} esm-browser-runtime`.split(' '),
+      `run --silent build vue ${buildOptions} esm-browser-runtime`.split(' '),
       options,
     ),
   ])
index dcd215680bad49e3f1caddff0478eb6c4360df29..ae48553b9793d18d9867d019e40a0a2e111e93ff 100644 (file)
@@ -9,7 +9,7 @@
     "start": "node index.js"
   },
   "dependencies": {
-    "@vitejs/plugin-vue": "npm:@vue-vapor/vite-plugin-vue@0.0.0-alpha.6",
+    "@vitejs/plugin-vue": "https://pkg.pr.new/@vitejs/plugin-vue@vapor",
     "connect": "^3.7.0",
     "sirv": "^2.0.4",
     "vite": "^5.0.12"
index 273ce1e848c8b7b353897488b7475da567a310e0..852feeac0ce8483b5b93ff5fc83242fe23a7b466 100644 (file)
@@ -25,7 +25,10 @@ export function insert(
   parent: ParentNode,
   anchor: Node | null = null,
 ): void {
-  normalizeBlock(block).forEach(node => parent.insertBefore(node, anchor))
+  const nodes = normalizeBlock(block)
+  for (let i = 0; i < nodes.length; i++) {
+    parent.insertBefore(nodes[i], anchor)
+  }
 }
 
 export function prepend(parent: ParentNode, ...blocks: Block[]): void {
@@ -33,7 +36,10 @@ export function prepend(parent: ParentNode, ...blocks: Block[]): void {
 }
 
 export function remove(block: Block, parent: ParentNode): void {
-  normalizeBlock(block).forEach(node => parent.removeChild(node))
+  const nodes = normalizeBlock(block)
+  for (let i = 0; i < nodes.length; i++) {
+    parent.removeChild(nodes[i])
+  }
 }
 
 export function createTextNode(values?: any[] | (() => any[])): Text {
index 61f275c0f559f3e7980aa082754a769c68841395..10a683fa6b823890023345760e8a62e7adf51b02 100644 (file)
@@ -186,8 +186,8 @@ importers:
   benchmark:
     dependencies:
       '@vitejs/plugin-vue':
-        specifier: npm:@vue-vapor/vite-plugin-vue@0.0.0-alpha.6
-        version: '@vue-vapor/vite-plugin-vue@0.0.0-alpha.6(vite@5.3.3(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6))(vue@3.5.6(typescript@5.6.2))'
+        specifier: https://pkg.pr.new/@vitejs/plugin-vue@vapor
+        version: https://pkg.pr.new/@vitejs/plugin-vue@vapor(vite@5.3.3(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6))(vue@3.5.6(typescript@5.6.2))
       connect:
         specifier: ^3.7.0
         version: 3.7.0
@@ -1524,6 +1524,14 @@ packages:
       vite: ^5.0.0
       vue: ^3.2.25
 
+  '@vitejs/plugin-vue@https://pkg.pr.new/@vitejs/plugin-vue@vapor':
+    resolution: {tarball: https://pkg.pr.new/@vitejs/plugin-vue@vapor}
+    version: 5.1.3
+    engines: {node: ^18.0.0 || >=20.0.0}
+    peerDependencies:
+      vite: ^5.0.0
+      vue: ^3.2.25
+
   '@vitest/coverage-v8@2.1.1':
     resolution: {integrity: sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==}
     peerDependencies:
@@ -1575,13 +1583,6 @@ packages:
       vite: ^5.0.0
       vue: '*'
 
-  '@vue-vapor/vite-plugin-vue@0.0.0-alpha.6':
-    resolution: {integrity: sha512-V2aTQ7bkDXsoPvYIkTA54m3ypUXDIVpTFspn+ycuYcMfIY37cZ0ny6jm/afNY6k1DiaQ9JfAMBXAKzTBpu2B9A==}
-    engines: {node: ^18.0.0 || >=20.0.0}
-    peerDependencies:
-      vite: ^5.0.0
-      vue: '*'
-
   '@vue/compiler-core@3.5.6':
     resolution: {integrity: sha512-r+gNu6K4lrvaQLQGmf+1gc41p3FO2OUJyWmNqaIITaJU6YFiV5PtQSFZt8jfztYyARwqhoCayjprC7KMvT3nRA==}
 
@@ -4768,6 +4769,11 @@ snapshots:
       vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6)
       vue: link:packages/vue
 
+  '@vitejs/plugin-vue@https://pkg.pr.new/@vitejs/plugin-vue@vapor(vite@5.3.3(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6))(vue@3.5.6(typescript@5.6.2))':
+    dependencies:
+      vite: 5.3.3(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6)
+      vue: 3.5.6(typescript@5.6.2)
+
   '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@20.16.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)(terser@5.31.6))':
     dependencies:
       '@ampproject/remapping': 2.3.0
@@ -4842,11 +4848,6 @@ snapshots:
       vite: 5.2.9(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6)
       vue: link:packages/vue
 
-  '@vue-vapor/vite-plugin-vue@0.0.0-alpha.6(vite@5.3.3(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6))(vue@3.5.6(typescript@5.6.2))':
-    dependencies:
-      vite: 5.3.3(@types/node@20.16.5)(sass@1.78.0)(terser@5.31.6)
-      vue: 3.5.6(typescript@5.6.2)
-
   '@vue/compiler-core@3.5.6':
     dependencies:
       '@babel/parser': 7.25.3