examples
examples copied to clipboard
feature: add showcase egg&umi with typescript
Checklist
- [x]
npm test
passes - [x] tests and/or benchmarks are included
- [x] documentation is changed or added
- [x] commit message follows commit guidelines
Affected core subsystem(s)
Description of change
cc @atian25 还存在可以优化的地方: 1.目录结构
src目录借用了umi那边的结构,如果转移到app/web下面,
webpack的TS编译就会出错,会出现找不到tsconfig.json,而导致无法正确编译TS文件。
除此之外,还有**@**别名的问题。umi生成的代码中有require('@/app'),在TS编译过程中会报找不到文件,JS文件没有这个问题。
所以目前的修改,基本是按照确保umi和egg目录结构独立的想法去实现的,实现起来也较为方便。