-
Notifications
You must be signed in to change notification settings - Fork 116
Running serve
command wipes out function code
#8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do you have an example repo or gist to clarify the issue? Not quite catching the full issue here. |
Actually, it looks like I just didn't read the documentation fully. It says here to, at build time, put them into the functions directory because everything in there is what gets run through Webpack. https://functions-alpha--www.netlify.com/docs/lambda-functions/#configuring-the-functions-folder I was having the same issue described here: Closing because of this misunderstanding -- thx! |
Cool, glad it worked out. And you are on gitter! 🙌 |
In order for `netlify-lambda` to run, I need to create a dev folder because the functions folder is the output folder for webpack. Check netlify/netlify-lambda#8 (comment)
Hopefully I'm not missing a configuration option or something...
When I run the
serve
command, the code in my /functions/whatever.js appears to be processed by Webpack, wiping out the precompiled code I had written. As a makeshift solution, I've wrapped been first copying the precompiled file to a different directory to preserve it, but would not like to keep that up long term.The text was updated successfully, but these errors were encountered: