-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Compile-on-save with typescriptservices.js from LKG drops module prefixes #2061
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
Comments
This bug is present in 1.5 beta. I would have thought it's critical as it produces JavaScript that fails at runtime. |
@JsonFreeman can you take a look. |
@NoelAbrahams do you have noEmitOnError explicitly set to false in your project? I've investigated this with @vladima, but the only way we were able to reproduce it is to set noEmitOnError to false. |
I got it to repro earlier today without any changes. You just need to create a project add two files as listed above set --out, touch both files and then save the one with declare module. |
@mhegazy That is very interesting. What is special in scenario with '--out' is that you''ll trigger save in one file but during emit you'll examine the entire project. Crux of the problem: initial file will be typechecked however other files -- not so |
That makes sense.. |
@mhegazy This brings us back to the question, how did it repro for you if you had noEmitOnError turned on? |
@NoelAbrahams please try upgrading your VS with my fix, and see if it fixes your problem. |
Hi,
I'm using VS 2015 CTP 5 and wanted to try out
typescriptservices.js
from LKG of 12-Feb-2015.Code like the following:
When referenced from another project
is compiling into
This is only a problem when compile is triggered via save - generates the correct JavaScript when building.
Edit
This is a little bit more involved: The
combine JS into output file
also needs to be set. The faulty JS is generated not when the code file itself is saved, but when a sibling file in the same project is saved (which would cause the combined file to be generated).The text was updated successfully, but these errors were encountered: