Open ErKeLost opened 4 months ago
It seems that the processing of the config in the core was a bit complicated before, and config was modified in almost many places. It feels like it can be unified and processed in one place.
Final implementation version and roadmap (new Docs)
A new preview version of farm is expected to begin deploying in early October using https://github.com/stackblitz-labs/pkg.pr.new
Better vite support includes plugins and custom plugins
Better development experience and ui ux
More stable server-side functional integrity
More interesting new farm features, more customization options
A new bundle model is coming soon
change previews (WIP)
with farm
with vite(WIP)
Great and elegant design!
This refactoring will ensure that a large number of api and property break changes will not be designed
Optimize existing @farmfe/core config logic design
Add debug debugging to the node layer
Replace koa with connect
Try to adapt some hmr, jsPlugin Hook, etc. to farm native servers, rather than putting pressure on farm's vite compatibility layer, which will cause excessive pressure on subsequent maintenance
The middleware design needs to be re-considered to adapt to the existing koa middleware and user-written middleware or the reimplementation of other native middleware that needs to be replaced.
Currently, we are still thinking about design and finally achieve the goal of farm development rust ecosystem, and js ecosystem reuses vite ecosystem.
Now considering the initial stage, we are still in the process of design thinking, and may mainly consider it in the mojor version
Reasons for refactoring this node layer
Only by making the underlying infrastructure good enough can it better serve the stability of the upper framework.
This major and important update is mainly to accompany the sustainable development of the vite ecosystem, so that farm can follow the footsteps of vite's js ecosystem for a long time to come.
Progress till MVP
New Docs
Refctor functions
Node Side
vite adapter
Refactoring all vite proxy logic mainly targets errors caused by invalid configurations such as
esbuild
,rollup
options Elegant optimized performance Compatible with more vite plugins@farmfe/cli
@farmfe/core
Config
server.watch
options removehmr.watch
cacheDir
optionsServer
configureCompiler
andconfigureServer
hooks, and sortPlugin utilspluginHookUtils
jsplugin
vite
Currently testing all supported vite and unplugin plugins in the new version
vite plugins
unplugin plugins
other
[ ] #1850
[ ] perform example tests on all common properties and remove some useless examples (Importants)
unit Test
The entire node layer will be explained in more detail later, and everyone is welcome to participate and learn together. All code is in v2-dev branch,If you are interested, you can discuss the claim below
Rust Side
Persistent Cache Refactor
Plugin Hooks
new Worker(new URL(xxx))
HMR Optimize
add
andremove
event when HMRResolver
Module Federation
Refactor
Css Implementation Refactor
Grocery
Rust Plugins - All in Rust
Feature request