@difizen/umi-plugin-mana
Version:
- 支持 decorator 所需的 babel 配置,在 typescript 4 环境生效 - 支持动态路由路径 - 支持 nodenext,在 import path 中允许增加扩展名 - 支持 mana 运行时能力,基于 slot 的路由等
17 lines (15 loc) • 356 B
text/typescript
import type { IApi } from 'umi';
/**
* support nodenext, import module via file path with extname
*/
export default (api: IApi) => {
api.modifyWebpackConfig(async (memo) => {
if (memo.resolve) {
memo.resolve.extensionAlias = {
'.js': ['.js', '.ts', '.tsx'],
'.jsx': ['.jsx', '.tsx'],
};
}
return memo;
});
};