javascript - getting source maps of dependencies to work with angular2 and webpack -


my goal have angular2 project setup can debug source code of dependencies (present in node_modules directory). more precise want able debug (e.g. set breakpoints) in actual typescript files (i don't mean own typescript files files of dependency) in chrome dev tools. should possible if dependency contains source maps.

i tried use angular-cli apparently not yet possible, see debugging angular 2 typescript source code.

so tried start basic angular-seed project , adjusting it. project using webpack , added following webpack.config.js:

... module: {   preloaders: [     {       test:   /\.js$/,       loader: 'source-map-loader'     }   ], ... 

this works packages rxjs not work @angular packages because bundled files (e.g. core.umd.js etc) not contain source maps (the angular 2 team removed them due bug). bundled files lack source maps, non-bundled files in src folder contain source maps. how can tell webpack use non-bundled files instead of bundled files?

this article describes , solves same problem using systemjs. how can solve webpack?


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -