[插件分享] 写了个插件解决 module tool 无法转换动态导入类型的别名 #4511
Closed
baranwang
started this conversation in
Show and tell
Replies: 2 comments
-
I will restart the evaluation of this feature and try to build it into the feature, and then remove babel. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
别名转换 中提到无法转换动态引入类型的别名
但是
npm-component
构建模式会经常生成带别名的类型,为了避免这个问题,整个项目都要用相对路径来书写,会让代码可读性变差。于是我实现了一个基于
typescript-transform-paths
插件的解决方案,通过构建时向 tsconfig 添加插件,构建结束再还原 tsconfig 的方式解决了这个问题。modern-js-plugin-module-transform-paths
同时也可以作为一个思路给 webinfra 团队的同学,看看不是有可能有入侵性更小的方案。
Beta Was this translation helpful? Give feedback.
All reactions