examples icon indicating copy to clipboard operation
examples copied to clipboard

feature: add showcase egg&umi with typescript

Open qingdengyue opened this issue 5 years ago • 1 comments

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

qingdengyue avatar Jun 06 '19 05:06 qingdengyue

cc @atian25 还存在可以优化的地方: 1.目录结构

src目录借用了umi那边的结构,如果转移到app/web下面,
webpack的TS编译就会出错,会出现找不到tsconfig.json,而导致无法正确编译TS文件。
除此之外,还有**@**别名的问题。umi生成的代码中有require('@/app'),在TS编译过程中会报找不到文件,JS文件没有这个问题。
所以目前的修改,基本是按照确保umi和egg目录结构独立的想法去实现的,实现起来也较为方便。

qingdengyue avatar Jun 06 '19 05:06 qingdengyue