solidjs / solid-refresh

MIT License
86 stars 18 forks source link

Add note about needed webpack devServer config #20

Closed vincentfretin closed 2 years ago

vincentfretin commented 2 years ago

I spend hours searching why it always reloaded the page and not patching the component with my webpack setup. I hope this will be useful to the next person trying to use hmr with webpack. The important part is the two options

devServer: {
  liveReload: false,
  hot: true,
}

and also double brackets in .babelrc. When you give an additional option to a plugin, it needs to be an array.

ryansolid commented 2 years ago

Thank you.