Skip to content

Commit 1c1daa6

Browse files
committed
Parcel: Fix transpiling html pages too eagerly
Fixes codesandbox#1340
1 parent c12f5e2 commit 1c1daa6

File tree

1 file changed

+4
-1
lines changed
  • packages/app/src/sandbox/eval/presets/parcel/transpilers

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ self.addEventListener('message', async event => {
120120
}
121121
const elements = ATTRS[attr];
122122
// Check for virtual paths
123-
if (node.tag === 'a' && node.attrs[attr].lastIndexOf('.') < 1) {
123+
if (
124+
(node.tag === 'a' && node.attrs[attr].lastIndexOf('.') < 1) ||
125+
node.attrs[attr].endsWith('.html')
126+
) {
124127
continue;
125128
}
126129

0 commit comments

Comments
 (0)