TrilonIO / aspnetcore-Vue-starter

*NEW* Asp.net Core & Vue.js (ES6) SPA Starter kit - Vuex, webpack, Web API, Docker, and more! By @TrilonIO
https://www.trilon.io
MIT License
1.22k stars 266 forks source link

Hot Module Reload doesn't seem to work #51

Closed keithn closed 7 years ago

keithn commented 7 years ago

I just downloaded the repository, ran it, website came up fine, but any changes to files doesn't seem to update the website.

If I refresh the page, then the change appears

in the javascript console in chromeI have

EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.

Which keeps counting up.

( Using Visual Studio 2017 15.3.2 )

MarkPieszak commented 7 years ago

Yeah we're looking into this one, there's some kind of issue that appeared with dotnet 2.0 that's causing HMR to not really load properly! Might be linked with https://github.com/aspnet/JavaScriptServices/issues/1191

keithn commented 7 years ago

You've probably seen it.... but the pre packaged react project in visual studio 2017 has a HMR setup that works fine, I haven't had a look at what the differences are.

MarkPieszak commented 7 years ago

Yeah, I need to see what might be causing it here. Might be something in StartUp.cs I'm missing / or a file like that.

MarkPieszak commented 7 years ago

Might be that we need to get to 2.x of aspnet-webpack: "aspnet-webpack": "^2.0.1", can you give that a shot?

keithn commented 7 years ago

Yep, that worked.

elucidsoft commented 7 years ago

Thank god I found this solution, I've spent 3 days trying to figure this out...Never thought of upping the version of aspnet-webpack oddly enough...Can you please make this change to the branch?

MarkPieszak commented 7 years ago

Sure, I'll make the change now! Fixed via https://github.com/MarkPieszak/aspnetcore-Vue-starter/commit/f578bdf07de37beafb8359cfce3dba249a818ecf

canperk commented 6 years ago

Dude you saved my day :)