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

VS15 Preview 5: --outFile option now includes normal JS files #11655

Closed
saschanaz opened this issue Oct 15, 2016 · 8 comments
Closed

VS15 Preview 5: --outFile option now includes normal JS files #11655

saschanaz opened this issue Oct 15, 2016 · 8 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@saschanaz
Copy link
Contributor

saschanaz commented Oct 15, 2016

TypeScript Version: 2.0.5.0, the version embedded on VS15 Preview 5

Repro file:

https://github.com/SaschaNaz/TSFileInclusionRepro/

Repro steps:

Add some change to ts/foo.ts to generate js/app.js automatically. For example, add class Foo3 {}.

Expected behavior:

Compiler should include TS files only

Actual behavior:

class Foo {
}
class Foo2 {
}
// Your code here!
var mainjs = "mainjs";
var somemodule = "somemodule";

Why are you including JS files on your project?:

Because they will be excluded from app package if I don't.

Why do you bother?

Because TS tries to parse my emscripten-compiled JS file and even WinJS libraries and thus slows down everything.

@saschanaz
Copy link
Contributor Author

saschanaz commented Oct 15, 2016

CC: @paulvanbrenk

#11623 is not easy to repro (as it randomly happens time-wise) but I have succeeded making a repro small enough for this one.

@mhegazy mhegazy added the Bug A bug in TypeScript label Oct 15, 2016
@mhegazy mhegazy added this to the TypeScript 2.1 milestone Oct 15, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Oct 15, 2016

@zhenboli, this looks like the same root cause as #11649. we need some general solution here for external projects with both js and ts files

@saschanaz
Copy link
Contributor Author

@mhegazy tagging zhengbli or zhenboli...?

@paulvanbrenk
Copy link
Contributor

Because they will be excluded from app package if I don't.

This is also a problem, we should include generated js files automatically.

@saschanaz
Copy link
Contributor Author

TS-generated JS files are automatically included. Normal JS files are not.

@mhegazy mhegazy added 2.1 RC and removed 2.1 RC labels Oct 24, 2016
@mhegazy mhegazy modified the milestones: TypeScript 2.1.2, TypeScript 2.1 Oct 28, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Nov 8, 2016

@saschanaz, have you tried adding a tsconfig.json file?

@saschanaz
Copy link
Contributor Author

Can I try the fix on VS15 Preview 5? I tried this NuGet guide to get it but I still getting the same result.

This is my change: saschanaz/TSFileInclusionRepro@cf7ba0b

@mhegazy
Copy link
Contributor

mhegazy commented Nov 12, 2016

The fix is not included in the nuget package. It should be in a future release of VS "15".

A tsconfig should avoid the issue though.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

4 participants