You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
TypeScript watch mode compilation doesn't seem to be working for me. Hot module reloading is - changes to .html or .scss files are triggering an update in the browser. But modifying typescript files doesn't seem to regenerate any javascript, so there are no UI updates.
I can get the typescript to compile a change to a .cs file, then triggering a Visual Studio build, which makes me suspect webpack has nothing to do with it at all, and the compilation is just some VS built-in magic. I am also able to get HMR working with TypeScript by running tsc -w -p . in the project directory, in a separate window, but that's not an ideal workflow. And it's not actually clear to me why HMR is even working in this case, since I don't have an explicit .js loader.
If it helps, this is my webpack.config.js - it's pretty much the default one for an angular spa, with an additional sass loader:
I'm afraid I don't have any idea why things aren't working based on your description. You haven't mentioned anything that's different between your app and the default Yeoman generated project (which definitely does work).
Are you able to provide repro steps? As in, starting from the Yeoman-generated project, what can I do to recreate the same stuff not working as you're experiencing?
Did you create a project from scratch or are you using the templates? I had the same problem as you when I was trying to learn trying to recreate a project from a blank ASP.NET Core project.
If it's your case, open your .xproj file on a text editor and add TypeScriptCompileBlocked on the first PropertyGroupsection, like this:
Thanks for the replies - @rbasniak , that didn't seem to do the trick for me.
I'm trying doing a comparison of my project to a newly-generated one (which does with HMR on TypeScript changes), but it might take a little while. There are quite a few differences since I created mine last week! Will post again if I figure out what's wrong.
Activity
SteveSandersonMS commentedon Sep 21, 2016
I'm afraid I don't have any idea why things aren't working based on your description. You haven't mentioned anything that's different between your app and the default Yeoman generated project (which definitely does work).
Are you able to provide repro steps? As in, starting from the Yeoman-generated project, what can I do to recreate the same stuff not working as you're experiencing?
rbasniak commentedon Sep 21, 2016
Did you create a project from scratch or are you using the templates? I had the same problem as you when I was trying to learn trying to recreate a project from a blank ASP.NET Core project.
If it's your case, open your .xproj file on a text editor and add
TypeScriptCompileBlockedon the firstPropertyGroupsection, like this:Hope that helps...
mmkal commentedon Sep 22, 2016
Thanks for the replies - @rbasniak , that didn't seem to do the trick for me.
I'm trying doing a comparison of my project to a newly-generated one (which does with HMR on TypeScript changes), but it might take a little while. There are quite a few differences since I created mine last week! Will post again if I figure out what's wrong.
SteveSandersonMS commentedon Sep 22, 2016
OK thanks for the update. If your investigations lead you to think there's an issue, please reopen with details!