Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-plugin-component 在构建ts时未移除跨文件的type或interface声明 #365

Open
bruce007lee opened this issue Jul 10, 2022 · 0 comments

Comments

@bruce007lee
Copy link

bruce007lee commented Jul 10, 2022

  • build-plugin-componentversion:1.11.0
    现在通过build-plugin-component 编译ts文件时,跨文件的ts type或interface未被移除;比如:

src/file1.ts

 export interface MyProps {}

src/file2.ts

 export { MyProps } from './file1'

 export default {}

编译后src/file2.ts中的 MyProps 未被移除


看了下代码,现在构建使用的是babel的@babel/preset-typescript; 目前这个是不会支持多文件上下文编译的,是不是考虑用tsc或ts-loader来替换?这2个应该是没这个问题的

@bruce007lee bruce007lee changed the title build-plugin-component 在构建ts时未移除跨文件的type或inter build-plugin-component 在构建ts时未移除跨文件的type或interface声明 Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants