Skip to content
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

Importing a file from outside functions create error at build #1

Open
blaforet opened this issue Mar 25, 2018 · 1 comment
Open

Importing a file from outside functions create error at build #1

blaforet opened this issue Mar 25, 2018 · 1 comment

Comments

@blaforet
Copy link

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.

@robisim74
Copy link
Owner

Hi @blaforet,

I don't know a solution for this behaviour. It seems to be by design, see for example here: microsoft/TypeScript#16683 and here: microsoft/TypeScript#8245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants