-
Notifications
You must be signed in to change notification settings - Fork 74
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
tsify 0.15.5 compiles all ts files even if they're not imported #143
Comments
Do you have a |
Yes. It's this:
|
This might be the same issue as #142, which is a problem that my team ran into. The compiler is loading files according to |
But I don't see where my |
By setting the |
I recognize this behavior may be counter-intuitive for some users, but that's how Ultimately, there are two competing interpretations of which files to compile, one of which comes from the Browserify camp, and the other of which comes from the TypeScript camp. Browserify users expect the passed-in files and their dependencies to be used, and no others. TypeScript users expect the My goal is to provide as thin as possible a layer on top of the TypeScript compiler in order to enable the bundling of CommonJS dependencies that Browserify provides. To that end, I'm attempting to follow the conventions set by TypeScript rather than Browserify if there is a conflict. Ultimately, if you have a I reverted the changes and re-released with a major version bump because this was a breaking change for some users. |
Sigh..... |
@azarus This is a pretty old issue and with TypeScript 2.0 and later the |
I'm using browserify/tsify within a gulp file. It starts off by compiling some file passed from the command line -
tsStartFile
. Everything is fine with tsify 0.15.4. But with 0.15.5, instead of just starting withtsStartFile
and working recursively outward through all imported.ts
files, it seems to compile every single.ts
file it can find beneath the starting directory. Aside from being inefficient, this can cause problems if you have non-compiling.ts
fragments that you're working on in some subdirectory - you'll get a bunch of syntax errors and compilaton will stop. Right now I've just reverted to0.15.4
.This is the relevant part of my gulp file:
The text was updated successfully, but these errors were encountered: