Building server part of (React) isomorphic webapp with webpack including style-loader for CSS

后端 未结 1 1902
無奈伤痛
無奈伤痛 2021-01-14 20:39

I am attempting to make a React application that I am developing isomorphic. One of the known problems with doing this is that webpack loaders allow import/require

相关标签:
1条回答
  • 2021-01-14 21:18

    The answer is not to use style-loader in your server build: its sole purpose is to take CSS, turn it into a <style> element, and insert it into the DOM. Most people seem to use the ExtractTextPlugin to collect their CSS for inclusion on the server side.

    0 讨论(0)
提交回复
热议问题