rollup的"@rollup/plugin-node-resolve"插件默认支持"src"路径别名。
同时,路径别名可以直接在tsconfig.json配置
- name
- version
npm i
npm run dev:build
npm run dev:start
npm run dist
└─root
│
├─build //存放打包脚本
├─dist //打包后的输出目录
└─src //存放源码
│ app.ts
│ config.ts //项目统一配置
│
├─bin
│ www.ts //项目启动页
│
├─controller
├─model
├─public //视图层资源
├─routes //存放路由
│ index.ts
│
└─views // 视图层
│ index.ejs