I
I
Igor Shumilovsky2016-03-05 10:42:00
React
Igor Shumilovsky, 2016-03-05 10:42:00

React hot reload can track css?

Hi guys. React-hot-loader does a great job of hot-loading modules, but doesn't follow changes in css. Can this be fixed somehow? Who uses this thing, tell me how you refresh the pages if the css is in different files with the component?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Shumilovsky, 2016-03-16
@JiSeven

The style-loader has HMR support, so in order for the styles to be reloaded, you need not to export the styles to a file (do not use the extract-text-webpack-plugin)

loaders: [
        'style?sourceMap',
        'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]'
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question