Skip to content

Commit d00b871

Browse files
bartlomiejuclaude
andcommitted
fix: revert asset() wrapping on import URLs from first approach
The preact_hooks.ts changes from the initial URL-based approach were accidentally left in the commit. These added ?__frsh_c query params to JS module imports which broke builder-path tests. The immutable flag approach doesn't need any changes to import URLs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f6ad1bd commit d00b871

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

packages/fresh/src/runtime/server/preact_hooks.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -507,13 +507,13 @@ function RemainingHead() {
507507
if (island.css.length > 0) {
508508
for (let i = 0; i < island.css.length; i++) {
509509
const css = island.css[i];
510-
items.push(h("link", { rel: "stylesheet", href: asset(css) }));
510+
items.push(h("link", { rel: "stylesheet", href: css }));
511511
}
512512
}
513513
});
514514

515515
RENDER_STATE.islandAssets.forEach((css) => {
516-
items.push(h("link", { rel: "stylesheet", href: asset(css) }));
516+
items.push(h("link", { rel: "stylesheet", href: css }));
517517
});
518518

519519
if (items.length > 0) {
@@ -702,7 +702,7 @@ function FreshRuntimeScript() {
702702
const islandSpec = island.file.startsWith(".")
703703
? island.file.slice(1)
704704
: island.file;
705-
return `import ${named} from "${asset(`${basePath}${islandSpec}`)}";`;
705+
return `import ${named} from "${basePath}${islandSpec}";`;
706706
}).join("");
707707

708708
const islandObj = "{" + islandArr.map((island) => island.name)
@@ -717,9 +717,8 @@ function FreshRuntimeScript() {
717717
const runtimeUrl = buildCache.clientEntry.startsWith(".")
718718
? buildCache.clientEntry.slice(1)
719719
: buildCache.clientEntry;
720-
const scriptContent = `import { boot } from "${
721-
asset(`${basePath}${runtimeUrl}`)
722-
}";${islandImports}boot(${islandObj},${serializedProps});`;
720+
const scriptContent =
721+
`import { boot } from "${basePath}${runtimeUrl}";${islandImports}boot(${islandObj},${serializedProps});`;
723722

724723
return (
725724
h(

0 commit comments

Comments
 (0)