Skip to content

Commit f7e2cc2

Browse files
committed
Fix style HMR on vanilla templates
Fixes codesandbox#917
1 parent 0a754e2 commit f7e2cc2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

packages/app/src/sandbox/eval/transpiled-module.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -900,15 +900,14 @@ export default class TranspiledModule {
900900
}
901901

902902
postEvaluate(manager: Manager) {
903-
if (!manager.webpackHMR) {
904-
// For non cacheable transpilers we remove the cached evaluation
905-
if (
906-
manager.preset
907-
.getLoaders(this.module, this.query)
908-
.some(t => !t.transpiler.cacheable)
909-
) {
910-
this.compilation = null;
911-
}
903+
// Question: do we need to disable this for HMR projects?
904+
// For non cacheable transpilers we remove the cached evaluation
905+
if (
906+
manager.preset
907+
.getLoaders(this.module, this.query)
908+
.some(t => !t.transpiler.cacheable)
909+
) {
910+
this.compilation = null;
912911
}
913912
}
914913

0 commit comments

Comments
 (0)