Skip to content

Commit 594f7dc

Browse files
authored
fix(prefetch): broken "minification"
1 parent 376aea1 commit 594f7dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/qwik/src/core/components/prefetch.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export const PrefetchServiceWorker = (opts: {
4444
}
4545
let code = PREFETCH_CODE.replace('URL', resolvedOpts.path);
4646
if (!isDev) {
47-
code = code.replaceAll(/\s+/gm, '');
47+
// consecutive spaces are indentation
48+
code = code.replaceAll(/\s\s+/gm, '');
4849
}
4950
const props = {
5051
dangerouslySetInnerHTML: [

0 commit comments

Comments
 (0)