Expose the template generator via a REST api#80
Conversation
| canvas: { | ||
| create(width, height) { | ||
| // Not implemented in Cloudflare Workers | ||
| throw new Error("Not implemented") |
There was a problem hiding this comment.
Could probably reuse the one from the CLI.
|
It seems that cloudflare workers dont allow the use of It does also present an intresting attack vector for this if we do self host this. |
|
I think it's possible to use Vite to precompile the eval into string templates. |
|
Ohh intresting, thanks. It seems it uses ETA.compileToString to generate the code usually consumed via eval. Doing this at build would likely be a benefit everywhere this is ran. |
|
Well, I tried it, doesn't seem to be working. Still spits out |
|
Eta v3's compile seems to guard the |
Thanks, I have cherry-picked this into my branch. Ill continune from here :) |
| @@ -1,4 +1,5 @@ | |||
| { | |||
| "remoteUser": "node", | |||
There was a problem hiding this comment.
For clarity, I changed the Dev Container to use the node user instead of root as it messes with the file permission on Linux host.
There was a problem hiding this comment.
Ah, I thought it was to solve the warning that jekyll prints :) Solved 2 things at once 👍
Co-authored-by: deirn <deirn@bai.lol>
No description provided.