Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3dc9ac9

Browse filesBrowse files
Add docs note about TypeScriptCompileBlocked as requested in aspnet#399
1 parent bf71e3e commit 3dc9ac9
Copy full SHA for 3dc9ac9

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Filter options
  • src/Microsoft.AspNetCore.SpaServices
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Collapse file

‎src/Microsoft.AspNetCore.SpaServices/README.md‎

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.SpaServices/README.md
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,14 @@ Now when you load your application in a browser, you should see a message like t
606606

607607
If you edit any of your source files that get built by webpack, the result will automatically be pushed into the browser. As for what the browser does with these updates - that's a matter of how you configure it - see below.
608608

609+
**Note for TypeScript + Visual Studio users**
610+
611+
If you want HMR to work correctly with TypeScript, and you use Visual Studio on Windows as an IDE (but not VS Code), then you will need to make a further configuration change. In your `.csproj` file, in one of the `<PropertyGroup>` elements, add this:
612+
613+
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
614+
615+
This is necessary because otherwise, Visual Studio will try to auto-compile TypeScript files as you save changes to them. That default auto-compilation behavior is unhelpful in projects where you have a proper build system (e.g., Webpack), because VS doesn't know about your build system and would emit `.js` files in the wrong locations, which would in turn cause problems with your real build or deployment mechanisms.
616+
609617
#### Enabling hot replacement for React components
610618

611619
Webpack has built-in support for updating React components in place. To enable this, amend your `UseWebpackDevMiddleware` call further as follows:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.