denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.54k stars 648 forks source link

Plugin islands are not pre-buildable #2171

Closed cbinzer closed 11 months ago

cbinzer commented 11 months ago

Hi,

I noticed that islands that are provided over a plugin are not pre-buildable. When I run deno run -A --unstable dev.ts build and start the app with deno run -A --unstable main.ts I get a not found error in the browser for the island. I don't see the island in the _fresh directory either.

Regards Christian

deer commented 11 months ago

Thanks for logging this. It's likely that I forgot this use case. I'll take a look later this week.

deer commented 11 months ago

@cbinzer, do you mind sharing your dev.ts? If it looks like this:

#!/usr/bin/env -S deno run -A --watch=static/,routes/

import dev from "$fresh/dev.ts";

await dev(import.meta.url, "./main.ts");

please try changing it to this:

#!/usr/bin/env -S deno run -A --watch=static/,routes/

import dev from "$fresh/dev.ts";
import config from "./fresh.config.ts";

await dev(import.meta.url, "./main.ts", config);
cbinzer commented 11 months ago

Hi @deer,

indeed, you're right. I forgot to set the config in dev.ts. Now it works. Thank you very much 🙏