MacOS: ERR_CONTENT_LENGTH_MISMATCH for webpack modules when debugging in dotnet core 2.0
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 17h 56m
- Merged PRs (30d)
- 21
Description
## Environment data
`dotnet --info` output:
```
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
```
VS Code version: 1.17-insiders
C# Extension version: 1.13.0-beta2
## Steps to reproduce
I've created an example repo that shows the issue. This only happens when attached to the debugger, `dotnet run` works as expected. There's a vscode launch configuration called 'Web' to start debugging. I've tested this on MacOS, Ubuntu (Kubuntu) and Windows 10 (see Actual behaviors below).
```
git clone https://github.com/ioninteractive/omnisharp-webpack-hmr-issue
dotnet restore
dotnet build
npm install
```
vscode -> launch -> 'Web'
visit http://localhost:5000/dist/index.html
Check the responses for app.[hash].js and vendor.[hash].js
## Expected behavior
webpack hot module JS files (app.[hash].js and vendor.[hash].js) return sub-second `200` responses.
## Actual behavior
MacOS: JS hot modules attempt to load (but buffer instead) until a `ERR_CONTENT_LENGTH_MISMATCH` is returned.
Kubuntu 16.04: JS hot modules buffer, then eventually load, taking between 5-10 seconds per file.
Windows 10: JS hot modules load with sub-second `200` responses.
Contributor guide
Assessment
This issue has not been assessed yet.