Skip to content

Commit

Permalink
fix: 使用 @zerollup/ts-transform-paths 代替官方插件
Browse files Browse the repository at this point in the history
  • Loading branch information
Liubasara committed Dec 28, 2021
1 parent dc83cb3 commit 2bf4e95
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/@custom-ui/frame-select/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FrameSelect from './main.vue'
// import FrameSelect from '@/main.vue'
// import FrameSelect from './main.vue'
import FrameSelect from '@/main.vue'
import { useDemo } from '@/hooks/useDemo'

const a: number = 1
Expand Down
2 changes: 1 addition & 1 deletion packages/build-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"tslib": "^2.3.1",
"ttypescript": "^1.5.13",
"typescript": "^4.5.2",
"typescript-transform-paths": "^3.3.1"
"@zerollup/ts-transform-paths": "^1.7.18"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 2 additions & 3 deletions packages/build-utils/src/custom-ui/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ async function getPlugins(buildOpt) {
tsconfigDefaults: {
compilerOptions: {
plugins: [
{ transform: 'typescript-transform-paths' },
{
transform: 'typescript-transform-paths',
afterDeclarations: true
transform: '@zerollup/ts-transform-paths',
exclude: ['*']
}
]
}
Expand Down
21 changes: 14 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3944,6 +3944,20 @@
tslib "^2.3.1"
upath2 "^3.1.10"

"@zerollup/ts-helpers@^1.7.18":
version "1.7.18"
resolved "https://registry.npmmirror.com/@zerollup/ts-helpers/download/@zerollup/ts-helpers-1.7.18.tgz#747177f6d5abc06c3a0f5dffe7362d365cf0391d"
integrity sha1-dHF39tWrwGw6D13/5zYtNlzwOR0=
dependencies:
resolve "^1.12.0"

"@zerollup/ts-transform-paths@^1.7.18":
version "1.7.18"
resolved "https://registry.npmmirror.com/@zerollup/ts-transform-paths/download/@zerollup/ts-transform-paths-1.7.18.tgz#72f705c66690879e51d53c73dc76c4e2518a8c50"
integrity sha1-cvcFxmaQh55R1Txz3HbE4lGKjFA=
dependencies:
"@zerollup/ts-helpers" "^1.7.18"

JSONStream@^1.0.4:
version "1.3.5"
resolved "https://registry.npm.taobao.org/JSONStream/download/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
Expand Down Expand Up @@ -14351,13 +14365,6 @@ typedarray@^0.0.6:
resolved "https://registry.nlark.com/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript-transform-paths@^3.3.1:
version "3.3.1"
resolved "https://registry.npmmirror.com/typescript-transform-paths/download/typescript-transform-paths-3.3.1.tgz#74526bc1b6dc575ffe269cc81833db7bd81763e1"
integrity sha1-dFJrwbbcV1/+JpzIGDPbe9gXY+E=
dependencies:
minimatch "^3.0.4"

typescript@4.5.2, typescript@^4.5.2:
version "4.5.2"
resolved "https://registry.npmmirror.com/typescript/download/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998"
Expand Down

0 comments on commit 2bf4e95

Please sign in to comment.