-
Notifications
You must be signed in to change notification settings - Fork 132
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
Browsersync & Hot module replacement? #4
Comments
Sounds cool. I will have a look a this |
Hello @amivit |
Hey guys. Sounds awesome 👍 And yes I have! So I suppose it is just a matter of installing the "browser-sync-webpack-plugin" and tweaking the webpack.dev.js file to include the plugin. Regarding HMR, I hope it's also as simple as using the --hot paramater!?? Another potentially helpful link: http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/ |
Hey Fabian, awesome work on this? I have a query, and please dont excuse it as dum, I read the doco on this repo, and it all looks good. But when you run the solution, should we be expecting in watch mode, when we make changes to the Angular TS code and webpack does its thing, that our browser will refresh? Or is this not possible? Is this what this initial rowsersync & Hot module request is in reference to? |
Hey @nigel-dewar, if you start the application with HTH Fabian |
Thanks Fabian, I will give it a shot. Cheers Sent from Samsung Mobile -------- Original message -------- Hey @nigel-dewarhttps://github.com/nigel-dewar, if you start the application with npm start the start-command "start": "webpack-dev-server --inline --progress --port 8080", should start a webpack-dev-server which automatically refreshes the browser. Note that it does not start the browser automatically. You have to do this manually by browsing to "localhost:8080". HTH Fabian You are receiving this because you were mentioned. |
Hi! I hate command prompt :-)
if (module['hot']) { It's all. Run debug from VS and get hot replacment. |
HI @maksir, really cool, thanks, I will try it out. Greetings Damien |
With the use of HMR through the Microsoft.AspNetCore.SpaServices library, I ask: what is the possibility of using Server Rendering too? I think it would be perfect there, top of the top performance. I have been trying for 1 full day to add and configure this template here, but I can not seem to make it work. I'll keep trying. If someone can, could they post the code snippet? |
I think building automatically for AOT is also a good idea.
|
Hi @maksir, have you the working example? |
Hi @maksir / damienbod, I tried your solution but keep running into problems. If I fix that by putting a backslash before the webpack output folder my index.html cannot be found anymore. Regards, Jeroen |
Hi @Geronimo2015 I have not looked at HMR in detail yet. I will have a look at this next, will not have time until later in the week, this issue, problem has been opened for a while now. Greetings Damien |
@Geronimo2015 @dbratsun @amivit I'll update the docs this week, let me know if you have any other issues. Greetings Damien |
Are these possible to support? One of the cooler benefits of Webpack!
Useful links: https://webpack.github.io/docs/hot-module-replacement.html
https://github.com/webpack/docs/wiki/hot-module-replacement-with-webpack
https://www.npmjs.com/package/browser-sync-webpack-plugin
Maybe inspiration from here: https://github.com/AngularClass/angular2-webpack-starter
The text was updated successfully, but these errors were encountered: