60frames / webpack-hot-server-middleware

:fire: Hot reload webpack bundles on the server
MIT License
324 stars 50 forks source link

webpack-loaders #50

Closed st0ffern closed 6 years ago

st0ffern commented 6 years ago

Great work @richardscarrott!

I dont know if people have made requests about this by now but i will try: I am working on extensive-react-server with preconfigured setup, fully editable. Here i am using webpack-hot-server-middleware as a feature in development mode.

The problem is: Using custom plugins og loaders with webpack

Works fine when i use babel-loader Crashes when i add style-loader returing a 404 Not Found

Any way around this?

richardscarrott commented 6 years ago

@stoffern The style-loader isn't designed to work on the server as it injects styles into the DOM, you should instead just use just the css-loader, e.g. https://github.com/60frames/react-boilerplate/blob/master/tasks/build/createConfig/rules/css.js#L16

richardscarrott commented 6 years ago

@stoffern closing due to inactivity, feel free to continue the conversation if you're still having issues.