New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile TypeScript functions source in functions emulator #5633
Comments
Currently, the Emulator infrastructure has a "watch" capacity that is monitoring the |
Second that it might better to have a usual setup for TypeScript build and watch processes from tsc, instead of a custom secret tsconfig/bundler usage. From my experience, a proper
|
I think I figured how to do it by patching
- const args = [path.join(__dirname, "functionsEmulatorRuntime")];
+ const args = ["--loader=@esbuild-kit/esm-loader", path.join(__dirname, "functionsEmulatorRuntime")];
-#!/usr/bin/env node
+#!/usr/bin/env node --loader=@esbuild-kit/esm-loader Voilà! Not sure why yet, but it seems the entry file in special must be Edit: I also patched Edit 2: This would make it even easier: #6112, please leave a 👍 there. |
Today, developers must compile TypeScript code manually by running
tsc
ortsc --watch
before starting the functions emulator to avoid running into a functions source-loading error (see #5627). This feature request is to implement the equivalent of pre-deploy hooks for the emulator so that developers can instruct the emulator on how to build their TypeScript functions.The text was updated successfully, but these errors were encountered: