@longzai-intelligence-bun/alias-plugin 0.0.16 → 0.0.18
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/README.md +12 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,10 +34,10 @@ const result = await Bun.build({
|
|
|
34
34
|
|
|
35
35
|
创建路径别名解析插件实例。
|
|
36
36
|
|
|
37
|
-
| 参数
|
|
38
|
-
|
|
|
39
|
-
| `rootDir`
|
|
40
|
-
| `aliasMap` | `AliasMap` | 别名前缀到目标目录的映射
|
|
37
|
+
| 参数 | 类型 | 说明 |
|
|
38
|
+
| ---------- | ---------- | -------------------------------------------- |
|
|
39
|
+
| `rootDir` | `string` | 项目根目录的绝对路径,别名目标目录相对此解析 |
|
|
40
|
+
| `aliasMap` | `AliasMap` | 别名前缀到目标目录的映射 |
|
|
41
41
|
|
|
42
42
|
`AliasMap` 类型:
|
|
43
43
|
|
|
@@ -66,14 +66,14 @@ const aliasMap = {
|
|
|
66
66
|
|
|
67
67
|
扩展名补全顺序:
|
|
68
68
|
|
|
69
|
-
| 序号 | 候选路径
|
|
70
|
-
|
|
|
71
|
-
| 1
|
|
72
|
-
| 2
|
|
73
|
-
| 3
|
|
74
|
-
| 4
|
|
75
|
-
| 5
|
|
76
|
-
| 6
|
|
69
|
+
| 序号 | 候选路径 |
|
|
70
|
+
| ---- | ------------ |
|
|
71
|
+
| 1 | 原路径 |
|
|
72
|
+
| 2 | `.ts` |
|
|
73
|
+
| 3 | `.tsx` |
|
|
74
|
+
| 4 | `.js` |
|
|
75
|
+
| 5 | `/index.ts` |
|
|
76
|
+
| 6 | `/index.tsx` |
|
|
77
77
|
|
|
78
78
|
## 能力边界
|
|
79
79
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longzai-intelligence-bun/alias-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "Bun.build 路径别名解析插件",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typecheck:test": "lzi-tsgo typecheck tsconfig/test.json",
|
|
26
26
|
"lint": "oxlint && oxfmt --check",
|
|
27
27
|
"lint:fix": "oxlint --fix && oxfmt",
|
|
28
|
-
"test": "bun test",
|
|
28
|
+
"test": "lzi-bun-cli test",
|
|
29
29
|
"test:watch": "bun test --watch",
|
|
30
30
|
"test:coverage": "bun test --coverage"
|
|
31
31
|
},
|