Skip to content

Commit a1f25bd

Browse files
committed
chore: tsup 无法正确处理 @babel 的default export,改回 unbuild
1 parent bcdbc7a commit a1f25bd

File tree

5 files changed

+1180
-351
lines changed

5 files changed

+1180
-351
lines changed

.vscode/launch.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
"request": "launch",
1010
"runtimeArgs": [
1111
"run-script",
12-
"dev:h5"
12+
"debug"
1313
],
1414
"runtimeExecutable": "npm",
1515
"skipFiles": [
1616
"<node_internals>/**"
1717
],
1818
"type": "node",
19-
"cwd": "${workspaceFolder}/playground",
20-
"preLaunchTask": "npm: watch",
2119
"console": "integratedTerminal"
2220
}
2321
]

.vscode/tasks.json

-18
This file was deleted.

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
],
4545
"scripts": {
4646
"clean": "rimraf dist",
47-
"build": "tsup",
47+
"build": "unbuild",
48+
"stub": "unbuild --stub",
49+
"debug": "unbuild --sourcemap && cd playground && pnpm dev:h5",
4850
"watch": "tsup --watch",
4951
"typecheck": "tsc -p . --noEmit",
5052
"lint": "eslint .",
@@ -54,7 +56,6 @@
5456
"dependencies": {
5557
"@antfu/utils": "^0.7.7",
5658
"@babel/generator": "^7.23.6",
57-
"@babel/traverse": "^7.24.1",
5859
"@babel/types": "^7.24.0",
5960
"@vue/compiler-sfc": "^3.4.21",
6061
"ast-kit": "^0.12.1",
@@ -69,6 +70,7 @@
6970
"@antfu/eslint-config": "^3.12.0",
7071
"@antfu/utils": "^0.7.7",
7172
"@babel/generator": "^7.23.6",
73+
"@babel/traverse": "^7.26.9",
7274
"@dcloudio/types": "^3.4.8",
7375
"@types/babel__core": "^7.20.5",
7476
"@types/babel__generator": "^7.6.8",
@@ -86,8 +88,8 @@
8688
"lint-staged": "^15.2.2",
8789
"magic-string": "^0.30.8",
8890
"rimraf": "^5.0.5",
89-
"tsup": "^8.3.6",
9091
"typescript": "^5.4.2",
92+
"unbuild": "^3.3.1",
9193
"unconfig": "^0.3.11",
9294
"unplugin": "^1.10.0",
9395
"vite": "^5.0.0",

0 commit comments

Comments
 (0)