We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 733c810 commit cfcfc74Copy full SHA for cfcfc74
lib/loader.js
@@ -338,8 +338,15 @@ module.exports = function (content) {
338
' hotAPI.createRecord("' + moduleId + '", Component.options)\n' +
339
' } else {\n' +
340
// update
341
+ ' if (module.hot.data.cssModules && JSON.stringify(module.hot.data.cssModules) !== JSON.stringify(cssModules)) {\n' +
342
+ ' delete Component.options._Ctor\n' +
343
+ ' }\n' +
344
' hotAPI.reload("' + moduleId + '", Component.options)\n' +
345
' }\n' +
346
+ // save cssModules
347
+ ' module.hot.dispose(function (data) {\n' +
348
+ ' data.cssModules = cssModules\n' +
349
+ ' })\n' +
350
'})()}\n'
351
}
352
// final export
0 commit comments