瀏覽代碼

chore: remove terser dep

Evan You 1 年之前
父節點
當前提交
36b1fefeac
共有 4 個文件被更改,包括 9 次插入8 次删除
  1. 1 1
      .github/renovate.json5
  2. 0 1
      package.json
  3. 7 5
      pnpm-lock.yaml
  4. 1 1
      scripts/usage-size.ts

+ 1 - 1
.github/renovate.json5

@@ -28,7 +28,7 @@
     },
     {
       groupName: 'build',
-      matchPackageNames: ['vite', 'terser'],
+      matchPackageNames: ['vite', '@swc/core'],
       matchPackagePrefixes: ['rollup', 'esbuild', '@rollup', '@vitejs'],
     },
     {

+ 0 - 1
package.json

@@ -101,7 +101,6 @@
     "semver": "^7.6.2",
     "serve": "^14.2.3",
     "simple-git-hooks": "^2.11.1",
-    "terser": "^5.31.1",
     "todomvc-app-css": "^2.4.3",
     "tslib": "^2.6.3",
     "tsx": "^4.16.2",

+ 7 - 5
pnpm-lock.yaml

@@ -155,9 +155,6 @@ importers:
       simple-git-hooks:
         specifier: ^2.11.1
         version: 2.11.1
-      terser:
-        specifier: ^5.31.1
-        version: 5.31.1
       todomvc-app-css:
         specifier: ^2.4.3
         version: 2.4.3
@@ -3922,6 +3919,7 @@ snapshots:
     dependencies:
       '@jridgewell/gen-mapping': 0.3.5
       '@jridgewell/trace-mapping': 0.3.25
+    optional: true
 
   '@jridgewell/sourcemap-codec@1.4.15': {}
 
@@ -4449,7 +4447,8 @@ snapshots:
 
   buffer-crc32@0.2.13: {}
 
-  buffer-from@1.1.2: {}
+  buffer-from@1.1.2:
+    optional: true
 
   buffer@5.7.1:
     dependencies:
@@ -4575,7 +4574,8 @@ snapshots:
 
   commander@12.1.0: {}
 
-  commander@2.20.3: {}
+  commander@2.20.3:
+    optional: true
 
   commondir@1.0.1: {}
 
@@ -6287,6 +6287,7 @@ snapshots:
     dependencies:
       buffer-from: 1.1.2
       source-map: 0.6.1
+    optional: true
 
   source-map@0.6.1: {}
 
@@ -6406,6 +6407,7 @@ snapshots:
       acorn: 8.12.1
       commander: 2.20.3
       source-map-support: 0.5.21
+    optional: true
 
   test-exclude@6.0.0:
     dependencies:

+ 1 - 1
scripts/usage-size.ts

@@ -2,7 +2,7 @@ import { mkdir, writeFile } from 'node:fs/promises'
 import path from 'node:path'
 import { rollup } from 'rollup'
 import nodeResolve from '@rollup/plugin-node-resolve'
-import { minify } from 'terser'
+import { minify } from '@swc/core'
 import replace from '@rollup/plugin-replace'
 import { brotliCompressSync, gzipSync } from 'node:zlib'