Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript+Static Web Assets integration #34165

Open
javiercn opened this issue Nov 18, 2024 · 3 comments · May be fixed by #34175
Open

Typescript+Static Web Assets integration #34165

javiercn opened this issue Nov 18, 2024 · 3 comments · May be fixed by #34175
Assignees
Labels
aspnet-core/svc razor-pages/subsvc Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@javiercn
Copy link
Member

javiercn commented Nov 18, 2024

Description

CompileTypeScript needs to be updated to CompileTypeScriptWithTSConfig as the target has changed

Improve this section to include removing the content from the wwwroot folder in the typescript section.

<ItemGroup>
  <Content Remove="wwwroot\<<path-to-typescript-outputs>>" />
</ItemGroup>

Page URL

https://learn.microsoft.com/en-us/aspnet/core/razor-pages/ui-class?view=aspnetcore-9.0&tabs=visual-studio#typescript-integration

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/razor-pages/ui-class.md

Document ID

fd116d00-0dc7-efaf-c714-34d77b345a05

Article author

@tdykstra

Related Issues

@Rick-Anderson
Copy link
Contributor

@guardrex you can take this if you like, otherwise I'll fix.

@Rick-Anderson Rick-Anderson linked a pull request Nov 19, 2024 that will close this issue
@guardrex
Copy link
Collaborator

I had already gone to 🛌 when you remarked, and I see you have the PR for it.

@javiercn
Copy link
Member Author

javiercn commented Nov 19, 2024

We also need this target instead of <Content Remove="wwwroot\<<path-to-typescript-outputs>>" /> and both CompileTypeScript and CompileTypeScriptWithTSConfig are needed, I believe.

+    <Target Name="RemoveDuplicateTypeScriptOutputs" BeforeTargets="GetTypeScriptOutputForPublishing">
+      <ItemGroup>
+        <Content Remove="@(GeneratedJavaScript)" />
+      </ItemGroup>
+    </Target>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspnet-core/svc razor-pages/subsvc Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

3 participants