Skip to content

Commit dcdb416

Browse files
author
Ives van Hoorne
committed
Fix HMR on vanilla templates with direct style from entry
Fixes codesandbox#1001
1 parent ffd408c commit dcdb416

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/app/src/sandbox/eval/presets/parcel/transpilers/html-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ self.addEventListener('message', async event => {
7272
self.postMessage({
7373
type: 'add-dependency',
7474
path: assetPath,
75+
isEntry: true,
7576
});
7677

7778
resources.push(assetPath);
@@ -168,7 +169,6 @@ setupHTML();
168169
const resourcePath = JSON.stringify(resource);
169170
compiledCode += `\n`;
170171
compiledCode += `\trequire(${resourcePath});\n`;
171-
compiledCode += `\tmodule.hot.accept(${resourcePath});`;
172172
});
173173
compiledCode += '\n}';
174174

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ export default class TranspiledModule {
907907
.getLoaders(this.module, this.query)
908908
.some(t => !t.transpiler.cacheable)
909909
) {
910+
debug(`Removing '${this.getId()}' cache as it's not cacheable.`);
910911
this.compilation = null;
911912
}
912913
}

0 commit comments

Comments
 (0)