firebase-functions-typescript-starter
firebase-functions-typescript-starter copied to clipboard
Importing a file from outside functions create error at build
Hi
In my main project have a generic common.ts file where I put some functions and constants. If I import this file into the functions, the "run deploy" does not work. It creates some build error and screws up the lib directory. It no longer updates the lib\index.js instead, it creates a new subfolder lib\functions\ and put everything there, like if it was the lib folder.
Therefore I need to duplicate my common.ts file and update it every time that I do change in the functions. It's not the best practice especially if I forget.
Any suggestion? Thank you Benoit L.
Hi @blaforet,
I don't know a solution for this behaviour. It seems to be by design, see for example here: https://github.com/Microsoft/TypeScript/issues/16683 and here: https://github.com/Microsoft/TypeScript/issues/8245