pluvial / svelte-adapter-deno

A SvelteKit adapter for Deno
https://svelte-adapter-deno.deno.dev/
MIT License
313 stars 14 forks source link

Deno deploy support? #11

Closed DefinitelyMaybe closed 2 years ago

DefinitelyMaybe commented 2 years ago

Howdy!

I ran through quickly setting up a new sveltekit project, added the deno adapter and wanted to deploy it straight away into deno deploy but it came up with the following error:

TypeError: Deno.lstatSync is not a function
    at existsSync (https://deno.land/std@0.106.0/fs/exists.ts:19:14)
    at createServer (file:///src/dist/index.js:2229:31)
    at file:///src/dist/index.js:2266:16

Is supporting deno deploy a direction that ya'll want to go in?

edit: Here's a link to the project if you'd like to take a look

jpaquim commented 2 years ago

Hey @DefinitelyMaybe ! I still need to give Deno Deploy a serious try, and haven't really experimented with running this adapter within that environment. It may make sense to create a separate adapter for that purpose, maybe a bit more similar to https://github.com/sveltejs/kit/tree/master/packages/adapter-cloudflare-workers

How has your experience been so far? Did you manage to get something working?

DefinitelyMaybe commented 2 years ago

oh, just small simple projects, I'm slowly building my way up. Deno deploy is still in beta and they've only just introduced support for parts of Deno so very early days. Liking where they're going 👍

Thinking I'll take the plunge and make a fork of this or the cloudfare-worker repo. Dunno where I'll get to.

jpaquim commented 2 years ago

Great, let me know when you have something available and I'll try to contribute :smiley: I'll test drive Deno Deploy more seriously one of these days.

jpaquim commented 2 years ago

Hey @DefinitelyMaybe! I have meanwhile migrated to oak from opine, which is well supported by Deno Deploy, and have a working example running :smile: https://svelte-adapter-deno.deno.dev

The deployed code is in this branch, but it's just running build on the example demo-app and committing the result: https://github.com/pluvial/svelte-adapter-deno/tree/deno-deploy

DefinitelyMaybe commented 2 years ago

OMGosh!!!!! amazing! thank you thank you thank you!

I can use this within a project I've got coming up

edit: well that was easy. deno deploys interface for deployments has had some nice UX changes since last I used it Top notch all round 👍