However, when I update the file and then rename it from
my-function.ts, netlify dev is no longer able to find the function. For example, it doesn’t show up in the list when I run
Since I already use typescript for the rest of the application, is there additional set up needed to use typescript in my Netlify functions?
By the way, this is my
functions = "serverless/functions/"
command = "yarn build"
from = "api/*"
to = "/.netlify/functions/:splat"
status = 200
Hey there, I’m in the process of learning this also. Check out this tutorial where he introduces
netlify-lambda in Part 3. It’s a great tutorial all around by the way!
What it will do is take your TypeScript, ES6, etc files and compile them into lambda-compatible code and create a
For TypeScript, you’ll need a
.babelrc file in the folder where your TypeScript functions are located.
Mine looks like this:
Works fine for me using
netlify dev so far but still having trouble with
netlify deploy at the moment. Hope that helps.