I'm trying to integrate an existing Angular 2 application into an existing ASP.NET Core project in Visual Studio. Both projects work independently, but when I try to compile the ASP.NET Core project in Visual Studio I get a bunch of typescript compilation errors related to files in the node_modules
folder.
How do I:
node_modules
I can get this to work by moving the node_modules
folder out into the project root, but this would require completely rearranging the the original project dependencies and build files and I would prefer to avoid that.
-1-. You can disable typescript compiling by editing project file (.xproj). Add this block:
<PropertyGroup>
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
</PropertyGroup>
-2-. To keep the compiler from looking at anything in node_modules - use exclude in tsconfig:
"exclude":[
"node_modules"
]
* Path to node_modules
is relative to tsconfig.json
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