Skip to content

Compiling C# aspnet project runs TypeScript compiler for wwwroot what is redundant and error-prone #2243

@evil-shrike

Description

@evil-shrike

I have aт aspnet core project where *.ts got deployed into wwwroot. Some of ts files are typings (from DefinetlyTyped). So very unclear reason existence that typescript files in wwwroot force dotnet/VS run TypeScript compiler.
First of all it's completely redundant. I compile all ts files already and copied them into wwwroot with my client build tools. But moreover it can produce errors. For example if mentined typing targets a newer version of TypeScript compiler than installed globally.
In case compilation of the aspnet project fails with the following error:
Error TS5023 Build:Unknown compiler option 'strictFunctionTypes'.

image

I'm getting the error in VS and Rider but not in cli (dotnet build).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions