README
@flatjs/evolve
The webpack based dev tools
evolve
of flatjs
The usages
$ npm i @flatjs/evolve
Features
- Integrated Mock system using
@flatjs/mock
- Provide some standard built-in plug-ins
clean-webpack
,context-replacement
,mini-css-extract
- Support multi cdn configuration for each
individual
entrydev
inte
rc
ntv
prod
- Support multi html template file output
index.html
,index-dev.html
,index-rc.html
,index-ntv.html
- Support
express
to proxy allserve
static
pagemodules
. - Support us filter dynamic import using
import()
- Allow us attach customized
middleware
to handle page render. - Allow individual define some configuration for each
entry item
. - Builtin
parallel
build for productionbuild
- Allow us specified extra
babel
presets or plugins to handle your webapp. - Builtin loaders
icon
babel
css
less
image
svg
font
- Split
mock
andevolve
configuration intoflatjs.mock.js
,flatjs.evolve.js
.
Notes
For evolve dts cause of lerna
package symlinks
, if we want to import types
without inline
mode. we must do as below:
- update
flatjs.dts.js
addfollowSymlinks: false,
- remove
paths:{}
fromcompilerOptions
of tsconfig.json - SEE: (monorepo will be inlined?)
- Cause of
webpack@5
there are some typings issue forplugins
, we remove these typings fromdevDependencies
e.g.mini-css-extract
,webpack-dev-server
,clean-webpack-plugin
- 注意一旦使用 antd 作为 externals, 此处要去掉
antd
modularImportsflatjs.evolve.js
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
transformToDefaultImport: true,
},