Umi: TypeScript不能支持antd的按需加载

Created on 6 May 2018  ·  5Comments  ·  Source: umijs/umi

umi没有开放对loader的配置,不论是ts-loader之后再来babel-loader,还是 ui-component-loader 都没办法用,框架是否可以考虑集成typescript的按需加载功能?

type(bug)

Most helpful comment

umi@2 里已解决,ts 后会走 babel 。

All 5 comments

typescript 按需加载需要怎么配?

https://ant.design/docs/react/use-in-typescript-cn#%E4%BD%BF%E7%94%A8-ts-import-plugin

@sorrycc 我有一个疑问,如果typescript不是按需加载的话,那umi内置了antd和antd-mobile,那不是不管有没有用,都会被引入发布包?假设我现在ui框架选的是其他的话,没有尝试过,就是突然想到这个问题

确实有这个问题。

umi@2 里已解决,ts 后会走 babel 。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ironyfive picture ironyfive  ·  3Comments

tauruswang picture tauruswang  ·  3Comments

ddzy picture ddzy  ·  3Comments

miaojinxing picture miaojinxing  ·  3Comments

y2891663091 picture y2891663091  ·  4Comments