Base on Webpack5 Module Federation Micro Frontends solution!
English | 简体中文
- Initialize EMP project:
npx @efox/emp-cli init
npm i -g @efox/emp-cli or yarn global add @efox/emp-cli
-
emp initInitialize project -
emp devDevelopmentemp dev --hotHot updateemp dev --openOpen the development page
-
emp buildBuildemp build --envSpecify the deployment environmentemp build --analyzeAnalyzeemp build --tsBuild the production environment, generateindex.d.tstodistdirectory at the same timeemp build --ts -p [types path] -n [types name]types pathdefault relative path isdist、types namedefault type file name isindex.d.ts
-
emp tscgenerateindex.d.tstodistdirectoryemp build --ts -p [types path] -n [types name]types pathdefault relative path isdist、types namedefault type file name isindex.d.ts
-
emp tss <remote-url>Synchronization remote typeemp tss <remote-url> -p [types path] -n [types name]types pathdefault relative path issrc、types namedefault type file name isempType.d.ts
-
emp serveFormal service -
emphelp
- MODE_ENV webpack mode Environment variable , use
process.env.EMP_ENV - EMP_ENV use
emp dev --env prodSet up to distinguish the deployment environment , useprocess.env.EMP_ENV
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true // eslint Auto format
},
"typescript.tsdk": "node_modules/typescript/lib", // ts css module type check
"typescript.enablePromptUseWorkspaceTsdk": true // ts css module type check
}