Skip to content

Commit 8d63ef5

Browse files
author
sw-yx
committed
update to CRA v3
1 parent 55934b2 commit 8d63ef5

File tree

5 files changed

+2725
-2307
lines changed

5 files changed

+2725
-2307
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# production
1010
/build
11-
/lambda
11+
/built-lambda
1212

1313
/.netlify
1414

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
> ⚠️You may not need `netlify-lambda`. [Netlify Dev](https://github.com/netlify/netlify-dev-plugin) works with `create-react-app` out of the box, give it a try! Only use `netlify-lambda` if you need a build step for your functions.
22
3-
This project is based on [Create React App v2](https://github.com/facebookincubator/create-react-app) and [netlify-lambda v1](https://github.com/netlify/netlify-lambda). (For more information about Create react App, check their full [documentation](https://github.com/facebookincubator/create-react-app#create-react-app).)
3+
This project is based on latest versions of [Create React App v3](https://github.com/facebookincubator/create-react-app) and [netlify-lambda v1](https://github.com/netlify/netlify-lambda).
44

5-
The main addition to base Create-React-App is a new folder: `src/lambda`. Each JavaScript file in there will automatically be prepared for Lambda function deployment.
5+
The main addition to base Create-React-App is a new folder: `src/lambda`. Each JavaScript file in there will be built for Lambda function deployment in `/built-lambda`, specified in [`netlify.toml`](https://www.netlify.com/docs/netlify-toml-reference/).
66

77
As an example, we've included a small `src/lambda/hello.js` function, which will be deployed to `/.netlify/functions/hello`. We've also included an async lambda example using async/await syntax in `async-chuck-norris.js`.
88

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[build]
22
command = "yarn build"
3-
functions = "lambda"
3+
functions = "built-lambda"
44
publish = "build"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"node-fetch": "^2.3.0",
77
"react": "^16.8.6",
88
"react-dom": "^16.8.6",
9-
"react-scripts": "^2.1.3"
9+
"react-scripts": "^3.0.0"
1010
},
1111
"scripts": {
1212
"start": "run-p start:**",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy