Skip to content

Commit b982f2a

Browse files
committed
fix(core): prevent import cycle errors
preloader is the best place for the build constants
1 parent 367767e commit b982f2a

File tree

1 file changed

+1
-1
lines changed
  • packages/qwik/src/optimizer/src/plugins

1 file changed

+1
-1
lines changed

packages/qwik/src/optimizer/src/plugins/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,13 +953,13 @@ export const manifest = ${JSON.stringify(serverManifest)};\n`;
953953
if (
954954
// The preloader has to stay in a separate chunk if it's a client build
955955
// the vite preload helper must be included or to prevent breaking circular dependencies
956+
id.endsWith('@qwik.dev/core/build') ||
956957
/[/\\](core|qwik)[/\\]dist[/\\]preloader\.[cm]js$/.test(id) ||
957958
id === '\0vite/preload-helper.js'
958959
) {
959960
return 'qwik-preloader';
960961
} else if (
961962
// likewise, core and handlers have to be in the same chunk so there's no import waterfall
962-
id.endsWith('@qwik.dev/core/build') ||
963963
/[/\\](core|qwik)[/\\](handlers|dist[/\\]core(\.prod|\.min)?)\.[cm]js$/.test(id)
964964
) {
965965
return 'qwik-core';

0 commit comments

Comments
 (0)