Skip to content
Open
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
2 changes: 2 additions & 0 deletions packages/start/src/config/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export function manifest(start: SolidStartOptions): PluginOption {
devServer = server;
},
async resolveId(id) {
if (id.startsWith("/@manifest/")) return id;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like it would have issues?


if (id === VIRTUAL_MODULES.clientViteManifest)
return `\0${VIRTUAL_MODULES.clientViteManifest}`;
if (id === VIRTUAL_MODULES.getClientManifest)
Expand Down
9 changes: 2 additions & 7 deletions packages/start/src/directives/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,10 @@ export function serverFunctionsPlugin(options: ServerFunctionsOptions): Plugin[]
}
return null;
},
async load(id, opts) {
load(id, opts) {
const mode = opts?.ssr ? "server" : "client";
if (id === options.manifest) {
const current = new Debouncer(() =>
[...manifest[mode]].map(entry => `import "${entry}";`).join("\n"),
);
preload[mode] = current;
const result = await current.promise.reference;
return result;
return [...manifest[mode]].map(entry => `import "${entry}";`).join("\n");
}
return null;
},
Expand Down
4 changes: 2 additions & 2 deletions packages/start/src/server/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ export function createBaseHandler(

if (mode === "async") return await stream;

delete (stream as any).then;

// using TransformStream in dev can cause solid-start-dev-server to crash
// when stream is cancelled
if (globalThis.USING_SOLID_START_DEV_SERVER) return stream;

delete (stream as any).then;

// returning stream directly breaks cloudflare workers
const { writable, readable } = new TransformStream();
stream.pipeTo(writable);
Expand Down
Loading