Open killersite opened 8 years ago
module.exports = { devtool: 'sourcemap', context: __dirname + '/app', entry: './index.js', output: { filename: 'bundle.js' }, module: { loaders: [ // run babel first then ng-annotate { test: /\.js$/, loaders: ['ng-annotate','babel'] } ] } };
When I use the above webpack config the source-map file is messed up with duplicate entries like the following.
"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",
This is causing Chrome to not find the correct lines...
It seems that ng-annotate is inserting lines in the code without the source-map getting corrected info.
So where before ng-annotate (when the source-map was created) the code looked like
/* @ngInject */ function HeroController(users) {
now after ng-annotate there are new lines that the source-map doesnt know about
/* @ngInject */ HeroController.$inject = ["users"]; function HeroController(users) {
which version?
"babel-preset-es2015": "^6.9.0", "babel-preset-react": "^6.11.1", "babel-core": "^6", "babel-loader": "^6", "ng-annotate-loader": "^0.1.1", "webpack": "^1.12.13",
Thanks
When I use the above webpack config the source-map file is messed up with duplicate entries like the following.
This is causing Chrome to not find the correct lines...
It seems that ng-annotate is inserting lines in the code without the source-map getting corrected info.
So where before ng-annotate (when the source-map was created) the code looked like
now after ng-annotate there are new lines that the source-map doesnt know about