-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Compile-on-build conflicting with Compile-on-save #5424
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
Which version of TS and VS are you using? and can you share a repro project? |
I'm using Visual Studio 2015 (build 23107) and TypeScript 1.6.3. The attached project (add I couldn't repro the formatting difference in this project (yet), so I'm thinking that has something to do with project-level ReSharper settings. If I can get this to repro, I'll let you know. |
Thanks for the repro. the first issue has been fixed in TS 1.5 (see #1812). the formatting issue is strange, have not seen this before. as for the last issue, looks like this project file does not have any configuration options. adding config options, either manually by unloading the project or by saving from the project property pages solves the issue: <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<TypeScriptSourceMap>True</TypeScriptSourceMap>
</PropertyGroup> how was this project created? is that from template? or hand authored? |
It was created using VS empty web project template. I will try the source map config to see if that fixes that issue. |
looks like we are not loading the property correctly. @paulvanbrenk can you take a look. i see the source map checkbox checked correctly in the project property pages but not passed correctly to the compiler.. |
This looks like it's fixed in 1.8 |
It seems that when Visual Studio compiles TS into JS, there are some inconsistencies, resulting in a ping-pong match with commits. Specifically, when compiling from a solution build, the yielded .js is different from the .js resulting from compiling from a save.
For one (simple) example, compile-on-save will use enums:
Where compile-on-build will use constants w/ comments:
Another example is how they vary their formats (this may be related to ReSharper settings, though not sure how to make these sync between build compiles and save compiles):
Compile-on-save:
Compile-on-build:
I'll also see the
sourceMappingUrl
comment get removed with compile-on-save:Then get added back on with compile-on-build.
Is this a bug, or is it something that we may have misconfigured somewhere?
The text was updated successfully, but these errors were encountered: