Skip to content

Commit 63c37ff

Browse files
committed
remove netlify-lambda from build process
1 parent 379c440 commit 63c37ff

File tree

5 files changed

+1101
-1707
lines changed

5 files changed

+1101
-1707
lines changed

gatsby-node.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -495,18 +495,3 @@ export const onPreBootstrap: GatsbyNode["onPreBootstrap"] = async ({
495495
copyContributors()
496496
reporter.info(`Contributors copied`)
497497
}
498-
499-
// Build lambda functions when the build is complete and the `/public` folder exists
500-
export const onPostBuild: GatsbyNode["onPostBuild"] = async (
501-
gatsbyNodeHelpers
502-
) => {
503-
const { reporter } = gatsbyNodeHelpers
504-
505-
const reportOut = (report: { stderr: string; stdout: string }) => {
506-
const { stderr, stdout } = report
507-
if (stderr) reporter.error(stderr)
508-
if (stdout) reporter.info(stdout)
509-
}
510-
511-
reportOut(await exec("npm run build:lambda && cp netlify.toml public"))
512-
}

netlify.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
# Default build command.
1414
# command = "yarn build" # debug with: "yarn build --verbose"
1515

16-
# Directory with the serverless Lambda functions to deploy to AWS.
17-
# netlify-lambda needs this netlify.toml file in order to build
16+
# Directory with the serverless Lambda functions to deploy to AWS
1817
functions = "public/functions"
1918

2019
[[headers]]
2120
for = "/*"
2221
[headers.values]
23-
Access-Control-Allow-Origin = "https://esp.ethereum.foundation"
22+
Access-Control-Allow-Origin = "https://esp.ethereum.foundation"
23+
24+
[[plugins]]
25+
package = "@netlify/plugin-gatsby"

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"is-relative-url": "^3.0.0",
5959
"lodash": "^4.17.21",
6060
"luxon": "^1.28.1",
61-
"netlify-lambda": "^2.0.3",
6261
"polished": "^4.1.4",
6362
"prism-react-renderer": "^1.1.1",
6463
"prismjs": "^1.27.0",
@@ -83,6 +82,7 @@
8382
"@chakra-ui/cli": "^2.4.1",
8483
"@chakra-ui/storybook-addon": "^5.0.1",
8584
"@netlify/functions": "^1.2.0",
85+
"@netlify/plugin-gatsby": "^3.7.2",
8686
"@storybook/addon-a11y": "^7.0.23",
8787
"@storybook/addon-actions": "^7.0.23",
8888
"@storybook/addon-essentials": "^7.0.23",
@@ -121,7 +121,6 @@
121121
"scripts": {
122122
"postinstall": "yarn theme",
123123
"build": "gatsby build",
124-
"build:lambda": "cross-env NODE_OPTIONS=--openssl-legacy-provider netlify-lambda build src/lambda --config=./webpack.lambda.js",
125124
"build:10gb": "cross-env NODE_OPTIONS=--max-old-space-size=10240 gatsby build",
126125
"clean": "gatsby clean",
127126
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
@@ -134,7 +133,6 @@
134133
"optimize-images": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/optimizeImages.ts",
135134
"crowdin-contributors": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/crowdin/getCrowdinContributors.ts",
136135
"start": "gatsby develop",
137-
"start:lambda": "netlify-lambda serve src/lambda",
138136
"start:static": "gatsby build && gatsby serve",
139137
"serve": "gatsby serve",
140138
"type-check": "tsc --noEmit",

webpack.lambda.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)