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

Webpack Source Mapping only working in production mode #131

Closed SteveF92 closed 5 years ago

SteveF92 commented 5 years ago

I've been using this template for a while now, but I've noticed something strange on the most recent versions. I may be missing something here, but it seems that source mapping (I believe that's the term) is only working when webpack is put into production mode. This issue can be seen in the basic version of the template, without making any changes.

In this screenshot you can see the chrome dev tools with webpack.config.js mode set to: mode: (isDevBuild ? 'development' :' This is as it is in the default template, no changes made.

DevMode

However, if I change mode to: mode: ('production'), I get this:

ProdMode

Maybe I'm missing something, but this feels like the opposite of the way it should be. Or maybe there's another way to debug my JS that I'm missing? This also may be more of an issue for one of the underlying dependencies, but I'm not sure which.

I can confirm that this happens in Chrome as well as Firefox.

Any assistance would be much appreciated.

SteveF92 commented 5 years ago

Okay, so I figured out what I was doing wrong. I found the source mapped files under "webpack://" and then "ClientApp/components". I think I was thrown off by the fact that the files have '?1234' appended to the end of them (1234 is just an example, it'll be different for anyone reading this).

ActualFiles

Hopefully someone else can benefit from this, because now I just feel kinda dumb.