bare_bones_react
bare_bones_react copied to clipboard
Problems building production with hooks
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?