farm icon indicating copy to clipboard operation
farm copied to clipboard

refactor hmr config parse feature

Open FairyScript opened this issue 11 months ago • 1 comments

What problem does this feature solve?

In the current project, the function of loading hmr configuration is too complicated. I hope that the relevant functions can be reconstructed into the following logic:

  1. use user config. when hmr_port is be used by other sw, throw error (in this case, farm cannot guarantee the availability of self-increasing ports. eg. reverse proxy)
  2. in default, hmr use 'auto' path and port (determined by browser,same as what browser use (not farm's default config))

more discussion is welcome, if there are no other comments I will submit a PR later.😊

What does the proposed API look like?

nothing changed

FairyScript avatar Apr 03 '24 03:04 FairyScript

PR welcome, as long as there's not breaking changes

wre232114 avatar Apr 03 '24 03:04 wre232114