Skip to content

Problems building production with hooks #1

Description

@jimwhurr

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions