| 1 | import * as Alchemy from "alchemy"; |
| 2 | import * as Cloudflare from "alchemy/Cloudflare"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | |
| 5 | export default Alchemy.Stack( |
| 6 | "CloudflareVueExample", |
| 7 | { |
| 8 | providers: Cloudflare.providers(), |
| 9 | state: Cloudflare.state(), |
| 10 | }, |
| 11 | Effect.gen(function* () { |
| 12 | const worker = yield* Cloudflare.Website.Vite("Vue", { |
| 13 | // vue-router runs in history mode, so deep links like /about must |
| 14 | // fall back to index.html for the client router to resolve them. |
| 15 | assets: { |
| 16 | htmlHandling: "auto-trailing-slash", |
| 17 | notFoundHandling: "single-page-application", |
| 18 | }, |
| 19 | }); |
| 20 | |
| 21 | return { |
| 22 | url: worker.url, |
| 23 | }; |
| 24 | }), |
| 25 | ); |