简体   繁体   中英

Visual Studio 2013 not finding javascript files compiled from typescript?

I'm using VS 2013 Community Edition Update 4 with Web Essentials, and when I add a new typescript file and save it, the .js file is generated.

But then when I try to add it to the index VS doesn't sense the .js to autocomplete the href attribut in the <script> tag.

If I add it by hand it works, the app works, the .js was generated but it doesn't seem to be part of the project, but it's a bit annoying to me.

Does anyone have a solution or something I'm missing ?

In the solution explorer click the

在此输入图像描述

icon, then right click on the .js file on the project tree and press include in project. Once the file is part of your project VS will autosuggest this file for href references.

With VS2015 you merely drag the TS file onto the editor. You will find that a JS tag is inserted in your code. This does not work in VS2013.


I have removed the method for rewriting URLs because it interferes with use of source mapping to directly debug typescript in VS and in the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM