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

Bug: tsc-hooks removes 'include' from tsconfig #34

Open
dderjoel opened this issue Dec 22, 2021 · 1 comment
Open

Bug: tsc-hooks removes 'include' from tsconfig #34

dderjoel opened this issue Dec 22, 2021 · 1 comment

Comments

@dderjoel
Copy link
Contributor

dderjoel commented Dec 22, 2021

Hi,
I am using version 1.1.2-beta.3 of this package, because I need the file-permissions-hooks.

My tsconfig.json.include does not have any entries ending with .ts or *.
that means, that it deletes the inlcude property from the config in copy-files.hook.js:L35.
and saves that to tsconfig.json.

After compilation it errors out in copy-files.hook.js:L65 with

/node_modules/tsc-hooks/hooks/copy-files/copy-files.hook.js:65
    for (const file of includedFiles) {
                       ^

ReferenceError: includedFiles is not defined
    at Object.onPostCompilation (./node_modules/tsc-hooks/hooks/copy-files/copy-files.hook.js:65:24)

I can't quite figure out where this variable is defined anyway, maybe injected from somewhere, but it is apparently empty.
And because it does not copy any files (because it error'ed out), it also does not write back the original tsconfig.json.

@dderjoel
Copy link
Contributor Author

How can we help with this?
Can you reproduce it?

Pushing, because it gets annoying in my projects that I need to checkout the tsconfig.json from VCS every build.
Would you accept a PR (as the others are also still pending)? Or would I need to fork and publish that?

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

1 participant