Skip to content

Commit 512ebb0

Browse files
authored
fix(cloud-function): use ts-node via NODE_OPTIONS (#10873)
* fix(cloud-function): use ts-node via NODE_OPTIONS * fix(cloud-function): use cross-env to set NODE_OPTIONS
1 parent eeb3784 commit 512ebb0

File tree

2 files changed

+81
-2
lines changed

2 files changed

+81
-2
lines changed

Diff for: cloud-function/package-lock.json

+78
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: cloud-function/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"main": "src/index.js",
1010
"scripts": {
1111
"build": "tsc -b",
12-
"build-redirects": "ts-node src/build-redirects.ts",
12+
"build-redirects": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node src/build-redirects.ts",
1313
"copy-internal": "rm -rf ./src/internal && cp -R ../libs ./src/internal",
1414
"gcp-build": "npm run build",
1515
"prepare": "([ ! -e ../libs ] || npm run copy-internal)",
16-
"proxy": "ts-node src/proxy.ts",
16+
"proxy": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node src/proxy.ts",
1717
"server": "npm run build && functions-framework --target=mdnHandler",
1818
"server:watch": "nodemon --exec npm run server",
1919
"start": "nf start"
@@ -45,6 +45,7 @@
4545
"@types/accept-language-parser": "^1.5.3",
4646
"@types/http-proxy": "^1.17.10",
4747
"@types/http-server": "^0.12.1",
48+
"cross-env": "^7.0.3",
4849
"http-proxy": "^1.18.1",
4950
"http-server": "^14.1.1",
5051
"nodemon": "^2.0.22",

0 commit comments

Comments
 (0)