I am creating an Aurelia application using Visual Studio 2015 and Typescript. I am using ASP.Net Core 1.0 R2.
Before yesterday when I compiled my application the .js files were generated and showed up just after the .ts files (see image).
I did something yesterday where they stopped being generated and I have no idea what I did. I am learning Typescript so not familiar enough with this to begin to know where to look. The only results I got searching the internet told me that the .js files were created in an appBundle.js file but I think this is old information because that was not the behavior I was seeing before yesterday, and my Aurelia app is not running because it says it cannot find the .js files.
Can anyone shed some light on what I need to do to get the .js files to be generated again?
UPDATE:
I deleted the app.html and app.ts files and recreated them and then rebuilt the project and suddenly the .js files are showing up and my app runs fine now.
Not sure why this fixed the problem, might be bug.
Anybody have any insight?
Compiling TypeScript. TypeScript is a typed superset of JavaScript that transpiles to plain JavaScript. It offers classes, modules, and interfaces to help you build robust components.
Simply set allowJs to true in your tsconfig. json compilerOptions and then make sure the . js file is included using files / include / exclude etc.
When we execute tsc filename. ts , TypeScript will generate a js file with the same name at runtime. To execute the generated js file, run node filename. js .
So if the code was written in TypeScript, it gets compiled and converted into JavaScript. This process is known as Trans-piled.
I guess the typescript controller is not compiling your .ts
files anymore because you have an error in your app.ts
file.
This behaviour depends on your settings to the typescript compiler (tsconfig file)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With