Skip to content

Commit 7843e78

Browse files
authored
Merge pull request #7737 from maiieul/fix-manifest-weird-bundling
fix: separate if statements in manifest.ts for bundling edge cases
2 parents 1a7bd59 + 316bae2 commit 7843e78

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/qwik/src/optimizer/src/manifest.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,14 @@ export function generateManifestFromBundles(
482482
.map((m) => path.relative(opts.rootDir, m));
483483
if (modulePaths.length > 0) {
484484
bundle.origins = modulePaths;
485+
// keep these if statements separate so that weird bundling still works
485486
if (modulePaths.some((m) => /[/\\]qwik[/\\]dist[/\\]preloader\.[cm]js$/.test(m))) {
486487
manifest.preloader = bundleFileName;
487-
} else if (modulePaths.some((m) => /[/\\]qwik[/\\]dist[/\\]core\.[^/]*js$/.test(m))) {
488+
}
489+
if (modulePaths.some((m) => /[/\\]qwik[/\\]dist[/\\]core\.[^/]*js$/.test(m))) {
488490
manifest.core = bundleFileName;
489-
} else if (
491+
}
492+
if (
490493
modulePaths.some((m) => /[/\\]qwik[/\\]dist[/\\]qwikloader(\.debug)?\.[^/]*js$/.test(m))
491494
) {
492495
manifest.qwikLoader = bundleFileName;

0 commit comments

Comments
 (0)