Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dry-snakes-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@builder.io/qwik': patch
---

fix: the bunding won't lead to circular dependencies in qwik-astro apps anymore.
16 changes: 0 additions & 16 deletions packages/qwik/src/optimizer/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading