Importing CSS files in Isomorphic React Components

前端 未结 10 1280
失恋的感觉
失恋的感觉 2020-11-30 22:01

I have a React application with Components written in ES6 - transpiled via Babel and Webpack.

In some places I would like to include specific CSS files with specific

10条回答
  •  -上瘾入骨i
    2020-11-30 22:21

    I've finally realised that this error is not originating at the compile stage, but rather at runtime. Because this is an ismorphic app, the components and any dependencies they have will first be parsed on the server (ie, in node). It is this that is causing the error.

    Thanks for all the suggestions, I will post more if/when I figure out how to have per-component stylesheets in an isomorphic application.

提交回复
热议问题