-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-plugin-functions): Add the ability to run functions locally and on Gatsby Cloud #30192
Conversation
Can't wait to use this! |
…30338) * Require files from the .cache directory so user can run es/commonjs * Panic on build if we get an error * Add some logging via reporter * logging to func * Update packages/gatsby-plugin-functions/src/gatsby-node.ts Co-authored-by: Ward Peeters <ward@coding-tech.com> * Function name does not include extension * Print a relative path to the functions directory Co-authored-by: Sidhartha Chatterjee <me@sidharthachatterjee.com> Co-authored-by: Ward Peeters <ward@coding-tech.com>
452cc37
to
1ee2d24
Compare
packages/gatsby/src/internal-plugins/dev-404-page/raw_dev-404-page.js
Outdated
Show resolved
Hide resolved
packages/gatsby/src/internal-plugins/dev-404-page/raw_dev-404-page.js
Outdated
Show resolved
Hide resolved
on vacation & requests are resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing we should also make sure with additional tests is how resilient our code is against names with special characters. Right now we only test the thing we are used to which is some-name.js
.
What about:
I-Am-Capitalized.js
some whitespace.js
with-äöü-umlaut.js
some-àè-french.js
use#hashtag.js
some-אודות.js
This also gets relevant when we'd have src/api/endpoint/[...catch].js
and people would access that with those characters
@LekoArts the hashtag one wouldn't work as it's a url fragment (which aren't sent to the server) |
Gotcha. Just added it as @pieh found a weird webpack bug that occurs when people use |
@pieh would find that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, got nothing else to add on my part. Dunno if @ascorbic wants to add anything to the .env
handling?
No, that's fine by me. |
🎉 🎉 Thanks everyone for getting this across the finish line. Huge for our Cloud Functions work!!! |
🎉 indeed! Published in |
An initial implementation of Gatsby Functions. Learn more at the RFC at #27667
Post feedback at #30735
Test this by installing
gatsby@functions-next
& addingFUNCTIONS: true
to your flags in your gatsby-config.js.