preboot/angular-webpack

cannot find .ts files in chrome debugger

phil123456 opened this issue · 10 comments

Hi,

I can only see js files, and only 3 of them
app, vendor and polyfills

there are also tons of .ts files in webpack://./src/app but they dont seem to be debugable
breakpoints do not work

any hint on this ?

thanks

This is not a issue, should be closed ....

it works with all other seeds I downloaded so far, so it IS an issue

why are the map files not shown ? I am an angular noob, so a little help would be apreciated
thanks

@phil123456 It sounds like your question is "why can't I see Typescript in the browser?". The entire point of webpack (and building an angular app) is that the Typescript is transpiled into Javascript only. Browsers do not know how to interpret Typescript.

you're telling we on cannot debug typescripts on a dev environement when using webpack ?
anyone doing js/ts/angular/(whatever related programming) will need to debug application every once in a while...

I see that in the webpack config, there are some environement variables (process.env.npm_lifecycle_event)
but how do I set these when running the web application ?

var ENV = process.env.npm_lifecycle_event;
var isTestWatch = ENV === 'test-watch';
var isTest = ENV === 'test' || isTestWatch;
var isProd = ENV === 'build';

  if (isProd) {
    config.devtool = 'source-map';
  }
  else if (isTest) {
    config.devtool = 'inline-source-map';
  }
  else {
    config.devtool = 'eval-source-map';
  }

come on , I tried forcing the value to

config.devtool = 'source-map';

with no luck

my collegues here who are more advanced in angular tell me it should work, so there is clearly a problem with this setup

nobody in your group never done any TS debugging ?

i recently started using '#source-map' instead of 'source-map'

tried that before, does not work either

it works with #inline-source-map
so why the... anyway, definetely a google/webpack issue (yes, CLEARLY an issue)
for info : ts files are located in webpack/src/...

phra commented

as you can CLEARLY see, the browser correctly display typescript files under webpack folder. closing this.

schermata da 2017-04-06 10-54-44