Skip to content

React App Template: HTML <head> tags in <body> #556

Closed

Description

@bbeaumatin

Hello,

When I create a new React App, all the <head> tags get duplicated in the <body>.
The file is correct when received by the browser (see network tab in chrome devtools), but the browser puts <head> tags in the <body> when interpreted (that or a CSB related script is causing this effect).

It doesn't really prevent me to use codesandbox but it has a few drawbacks, for example if I put a <link> tag to an external CSS and i use webpack css loader into the app, the external CSS will take priority on imported CSS because the <link> tab gets copied into the <body> (and then get positioned in the DOM after the imported CSS that webpack puts into the <head>).

Browser: Chrome up-to-date (v63)

It also happens when i import a project into codesandbox and that problem didn't occur on my local environment.

Tell me if you need more details to help you tackle this issue.

Activity

  1. changed the title [-]React App Teamplate: HTML <head> tags in <body>[/-] [+]React App Template: HTML <head> tags in <body>[/+] on Feb 15, 2018
  2. CompuIves commented on Feb 19, 2018

    @CompuIves
    Contributor

    Good one! I know how to fix this one, but need to find a way to fix this without breaking local dev environment for the contributors.

  3. lbogdan commented on May 3, 2018

    @lbogdan
    Contributor

    @bbeaumatin Are you still having this issue? I can't seem to reproduce it.
    @CompuIves Was this fixed?

  4. CompuIves commented on May 3, 2018

    @CompuIves
    Contributor

    This (#702) will fix it, I can finish that PR soonish.

  5. bbeaumatin commented on May 4, 2018

    @bbeaumatin
    Author

    @lbogdan Yes the issue is still here, if you try to create a new React app, open the preview in a new window and inspect the DOM with Chrome Dev Tools for exemple, and you can see markup in .

    @CompuIves Thanks for solving this soonish 👍

    Btw great quality tool overall i'm using it very often and i'm always enjoying it, the live session feature is amazing. It has become my tool of choice for prototyping, demoing, starting new apps. Thanks!

  6. the0neWhoKnocks commented on May 12, 2018

    @the0neWhoKnocks

    @CompuIves Any traction on your PR? Looks like the last commit was Apr 7, but there are test-integrations errors on the PR.

    @lbogdan It's definitely still an issue. Currently I'm adding ids to link tags so I can clean them out of the body.

  7. CompuIves commented on May 20, 2018

    @CompuIves
    Contributor

    Fixed in master, will be deployed either this evening or tomorrow morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions