@flatjs/evolve

the webpack based tools `evolve` of @flatjs

Usage no npm install needed!

<script type="module">
  import flatjsEvolve from 'https://cdn.skypack.dev/@flatjs/evolve';
</script>

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 entry dev 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 all serve static page modules.
  • 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 production build
  • Allow us specified extra babel presets or plugins to handle your webapp.
  • Builtin loaders icon babel css less image svg font
  • Split mock and evolve configuration into flatjs.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:

  1. update flatjs.dts.js add followSymlinks: false,
  2. remove paths:{} from compilerOptions of tsconfig.json
  3. SEE: (monorepo will be inlined?)
  4. Cause of webpack@5 there are some typings issue for plugins, we remove these typings from devDependencies e.g. mini-css-extract, webpack-dev-server, clean-webpack-plugin
  5. 注意一旦使用 antd 作为 externals, 此处要去掉 antd modularImports flatjs.evolve.js
  {
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: true,
    transformToDefaultImport: true,
    },