andrey-skl / ng-annotate-loader

Webpack loader to annotate angular applications
MIT License
120 stars 28 forks source link

Sourcemap not working with awesome-typescript-loader #24

Closed timofei-iatsenko closed 8 years ago

timofei-iatsenko commented 8 years ago
loaders: [
      {
        test: /\.[tj]s$/,
        loaders: ['ng-annotate', 'awesome-typescript-loader'],
        exclude: /node_modules/,
      },

i'm using devtool: 'cheap-module-source-map', option.

And see in console:

Failed to parse SourceMap: ...

awesome-typescript-loader is version 1.1.1, with typescript 1.8

andrey-skl commented 8 years ago

@thekip does this work without 'ng-annotate' loader?

timofei-iatsenko commented 8 years ago

Surely

timofei-iatsenko commented 8 years ago

Actually it's not so easy to reproduce, i've created a small application and bug is not appear.

Also i turned cheap-module-source-map to inline-cheap-module-source-map and looks like now it works.

I will research more.

timofei-iatsenko commented 8 years ago

Looks like now it works with cheap-module-source-map as well. I don't know what was the problem.

But now has another problem, file listed twice in source maps, and source map weight is twice bigger.

Symptoms looks same as in this issue: https://github.com/huston007/ng-annotate-loader/issues/23 :

"webpack:///./index.js", "webpack:///./index.js?2645", "webpack:///../~/angular/index.js", "webpack:///../~/angular/index.js?08f2", "webpack:///../~/angular/angular.js", "webpack:///../~/angular/angular.js?58d0",

But in my case SourceMaps still work.

thielmal commented 8 years ago

Can confirm that this commit fixed the issue for me. What's the status on a npm release of 0.1.2?

andrey-skl commented 8 years ago

Glad to hear! Let's publish it in a next few hours then.

andrey-skl commented 8 years ago

@LucasThielmann Published as 0.2.0