I have this Typescript project, that must be compiled to AMD and ES3. When I modify a file and save, the compile on save works just fine. However, when I build my solution, it re-compiles everything to commonjs
(actually the --module flag
is not provided so I just assume this is what's selected) and ES5.
I've checked the .csproj
for the proper config
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
I've added a tsconfig.json
at the root and also at the .ts
files location without any success.
What am I missing? Why is it using the right config for compile on save but not when I'm building the project? Also, randomly I'm getting the "Build: Cannot compile modules unless the --module
flag is provided." error.