Skip to content

can't get my css served in a react universal app! #120

Closed
@elhariri

Description

@elhariri

Hi, i'm trying to build an isomorphic react application, i've added mini-css-extract-plugin in my client webpack config. in my server i'm using renderToString and pushing the string in my html like this :

<!DOCTYPE html>
  <html>
    <head>
    // usual stuff
    </head>
    <body>
      <div id="app">
        ${html}   // here goes the rendered html
      </div>
      <script type="text/javascript"  src=".dist/public/bundle.js"></script>
    </body>
  </html>

the build is compiled perfectly but i can't get css on my page (the css file is imported in my root component app)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions