bare_bones_react icon indicating copy to clipboard operation
bare_bones_react copied to clipboard

Problems building production with hooks

Open jimwhurr opened this issue 6 years ago • 0 comments

Hi Chris, liked the barebones but there's a problem with it...

If I use React hooks it works great as long as I don't do a production build. If I do then the dev version gives invariant problems with the hooks.

This is seems to be because the template index.html includes the bundled scripts, then the webpack HtmlWebpackPlugin adds them again so you have both dev and production scripts loaded. I can correct by removing the scripts from server/index.html when doing dev but I have to add them back in for production build. Is there a way to make this happen automagically?

jimwhurr avatar Apr 13 '19 13:04 jimwhurr