A fundamental structure as below:
.
├── package.json
├── .umirc.ts
├── .env
├── dist
├── mock
├── public
└── src
├── .umi
├── layouts/index.tsx
├── pages
├── index.less
└── index.tsx
└── app.ts
All dependencies start with @umijs/preset-、@umijs/plugin-、umi-preset-、umi-plugin- will be registered as plugin/plugin-preset.
Configuration file, consist of configurations for builtin/plugin provided functions.
Environments
For example:
PORT=8888
COMPRESS=none
Default location of outpput of umi build
All .js、.ts files will be registered as mock.
All files in this directory will be copied to dist.
Auto-generated directory, such as entry point, routes..., will be generated here. Do not commit .umi to your git repo, since they will be re-generated as umi dev or umi build running.
Layout module for convention routing pattern.
All router entries here.
Runtime configuration module, provide expansibility at runtime. Such as router, render update.