From f544859a59ac29e5e20aac1d527453f749cdecf0 Mon Sep 17 00:00:00 2001 From: maiieul <45822175+maiieul@users.noreply.github.com> Date: Fri, 10 Oct 2025 12:37:40 +0200 Subject: [PATCH 1/2] fix: circular dependencies in qwik astro apps --- .../qwik/src/optimizer/src/plugins/plugin.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/qwik/src/optimizer/src/plugins/plugin.ts b/packages/qwik/src/optimizer/src/plugins/plugin.ts index 35ac8c78b3a..940330df101 100644 --- a/packages/qwik/src/optimizer/src/plugins/plugin.ts +++ b/packages/qwik/src/optimizer/src/plugins/plugin.ts @@ -986,22 +986,6 @@ export const manifest = ${JSON.stringify(serverManifest)};\n`; return chunkName; } } - - // The id either points to a context file, inline component, or src .js/.ts util/helper file (or a barrel file but it will be tree-shaken by rollup) - // Making sure that we return a specific id for those files prevents rollup from bundling unrelated code together - if (module.meta.qwikdeps?.length === 0) { - if (id.includes('node_modules')) { - const idx = id.lastIndexOf('node_modules'); - if (idx >= 0) { - const relToNodeModules = id.slice(idx + 13); - return relToNodeModules; - } - } else if (opts.srcDir && id.includes(opts.srcDir)) { - const path = getPath(); - const relToSrcDir = normalizePath(path.relative(opts.srcDir, id)); - return relToSrcDir; - } - } } // The rest is non-qwik code. We let rollup handle it. From bac1d783a56c4a347d41302fac9b347cbca5f297 Mon Sep 17 00:00:00 2001 From: maiieul <45822175+maiieul@users.noreply.github.com> Date: Fri, 10 Oct 2025 12:46:51 +0200 Subject: [PATCH 2/2] chore: changeset --- .changeset/dry-snakes-shout.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/dry-snakes-shout.md diff --git a/.changeset/dry-snakes-shout.md b/.changeset/dry-snakes-shout.md new file mode 100644 index 00000000000..75f3be5db74 --- /dev/null +++ b/.changeset/dry-snakes-shout.md @@ -0,0 +1,5 @@ +--- +'@builder.io/qwik': patch +--- + +fix: the bunding won't lead to circular dependencies in qwik-astro apps anymore.