Is it possible to add custom netlify functions
See original GitHub issueHey there 👋
I’m trying to deploy my svelte kit app to netlify, which seems to be working perfectly, when using the adapter.
However, I also wanted to deploy a custom function of mine and I noticed that this function is never deployed to netlify. Only the function called render
.
I also noticed that when I add my custom function to the specified functions
directory and then run npm run build
, my custom function is removed from the functions
folder and only the render
function is still there.
I’m wondering am I missing something here or is it currently not possible to add a custom function to netlify when using the adapter ?
Thanks in advance 🙇♂️
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:27 (11 by maintainers)
Top Results From Across the Web
Build functions - Netlify Docs
Create functions source files in TypeScript, JavaScript, and Go. Use environment variables with functions, manage dependencies, and test locally.
Read more >Make Static Pages Dynamic With Netlify Edge Functions
Can you customize someone's experience without tons of client-side JavaScript or complex SSR? Alex Shyba will show us how Netlify Edge ...
Read more >How to point a custom domain to a netlify function?
Edit: I tried adding redirects in the netlify.toml file, and that does work, but I'm still curious if there's a way to "directly"...
Read more >Build your Backend with Netlify Functions in 20 Minutes
Netlify makes deploying your front end quick and easy, and Netlify functions makes running a serverless backend just as easy. In this guide,...
Read more >Connect a custom domain | Firebase Hosting - Google
On this page · Set up your domain for Hosting. Step 1: Add domain; Step 2: Verify domain ownership; Step 3: Go live...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@benmccann I think this is still a real issue and need.
There is unique Netlify functionality that doesn’t seem accessible via SvelteKit endpoints yet.
Two examples I’m currently encountering are -
I’m not sure if / when it’ll make sense for SvelteKit to afford this ability via endpoints (esp if #2 is unique to Netlify only).
But, being able to create and include additional serverless functions in the build somehow (e.g. copying files from an aliased directory into the ‘build/functions’ directory) should make this work.
Without it, I’m finding myself running in circles trying to implement a full auth solution using Netlify.
If there’s a way to work around this in the short, that’d be great to know.
Thanks.
@ClaytonFarr yes i do think that there may be a way to handle this, but also the netlify adapter was probably not created with this usecase in mind so we may want to fix this uptstream. examples would help motivate the discussion.
fwiw i used to work at netlify and helped make netlify dev so thats why im volunteering since my background can probably help here