firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Pass `NODE_OPTIONS` when spawning `firebase-functions`

Open gustavopch opened this issue 1 year ago • 5 comments

With this change, it's possible to pass a loader to Node.js via the NODE_OPTIONS environment variable to enable support for TypeScript in the Cloud Functions emulator during development. For example:

NODE_OPTIONS='--loader=@esbuild-kit/esm-loader' firebase emulators:start

It doesn't affect the deployed Cloud Functions which still need to be transpiled.

Closes https://github.com/firebase/firebase-tools/issues/6112.

gustavopch avatar Jul 26 '23 22:07 gustavopch

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jul 26 '23 22:07 google-cla[bot]

Signed.

gustavopch avatar Jul 26 '23 22:07 gustavopch

Codecov Report

Patch and project coverage have no change.

Comparison is base (e17a4b3) 54.59% compared to head (4a9f2ee) 54.59%. Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6191   +/-   ##
=======================================
  Coverage   54.59%   54.59%           
=======================================
  Files         346      346           
  Lines       23663    23663           
  Branches     4870     4870           
=======================================
  Hits        12919    12919           
  Misses       9561     9561           
  Partials     1183     1183           
Files Changed Coverage Δ
src/deploy/functions/runtimes/node/index.ts 36.69% <ø> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 01 '23 20:08 codecov-commenter

@taeold @blidd-google Anything preventing the merge? It's just 1 line added.

gustavopch avatar Nov 29 '23 18:11 gustavopch

Is this PR stuck ? I can help if needed we are waiting for this for months

Aetherall avatar Feb 23 '24 11:02 Aetherall