Skip to content

Commit e255c35

Browse files
committed
Updates configration for Vercel and Typescript
1 parent e6eb91a commit e255c35

File tree

3 files changed

+37
-258
lines changed

3 files changed

+37
-258
lines changed

serverless.yml

-256
This file was deleted.

tsconfig.json

+15-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33
"target": "ES2020",
44
"module": "ES2020",
55
"moduleResolution": "node",
6-
"lib": ["DOM", "DOM.Iterable", "ES2020"],
6+
"allowImportingTsExtensions": true,
7+
"plugins": [
8+
{
9+
"name": "@astrojs/ts-plugin"
10+
},
11+
],
12+
"lib": [
13+
"DOM",
14+
"DOM.Iterable",
15+
"ES2020"
16+
],
717
"allowJs": true,
818
"skipLibCheck": true,
919
"esModuleInterop": true,
@@ -16,6 +26,9 @@
1626
"noEmit": true,
1727
"jsx": "react-jsx",
1828
"baseUrl": "src",
29+
"jsxImportSource": "react"
1930
},
20-
"include": [ "src" ]
31+
"include": [
32+
"src"
33+
]
2134
}

vercel.json

+22
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
{
2+
"version": 2,
3+
"routes": [
4+
{
5+
"src": "/api/(.*)",
6+
"dest": "/api/$1.js"
7+
}
8+
],
29
"functions": {
310
"api/*.js": {
411
"maxDuration": 10
512
}
13+
},
14+
"env": {
15+
"PLATFORM": "vercel",
16+
"CI": "false",
17+
"CHROME_PATH": "/usr/bin/chromium",
18+
"NODE_VERSION": "21.x",
19+
"GOOGLE_CLOUD_API_KEY": "",
20+
"BUILT_WITH_API_KEY": "",
21+
"REACT_APP_SHODAN_API_KEY": "",
22+
"REACT_APP_WHO_API_KEY": ""
23+
},
24+
"build": {
25+
"env": {
26+
"PLATFORM": "vercel"
27+
}
628
}
729
}

0 commit comments

Comments
 (0)