mikach / gulp-concat-sourcemap

Concatenate files and generate a source map file.
30 stars 9 forks source link

Do line numbers work correctly? #13

Open koistya opened 10 years ago

koistya commented 10 years ago

It seems like line numbers correctly match only for the first file in a bundle.

For example, source files:

/src/normalize.css
/src/style.css

Output file:

/build/style.css

DevTools in Google Chrome opens ./src/normalize.css correctly, and ./src/style.css not (in my case, it opens line # 118, when it should be line # 5. etc.)

yyfearth commented 10 years ago

Me too, the line numbers not correct.

yuri-karadzhov commented 10 years ago

For me even file names are wrong.

yyfearth commented 10 years ago

Yes, line numbers are wrong completely, also means filenames are wrong either. I copy the code and run directly using mozilla source-map, still completely wrong. So either source-map has bug or the way we use it was wrong.

rianmcguire commented 10 years ago

It looks like this is an issue with SourceNode in mozilla/source-map introduced in 0.1.34. It handles blank lines (ie. successive newline characters) badly. It's fixed by this commit (not yet released on npm): https://github.com/mozilla/source-map/commit/37da0497315028abf9a43014c630c0520310f471.

Here's the relevant bug: https://github.com/mozilla/source-map/pull/116

yyfearth commented 10 years ago

Yes, thanks. I tried the older version of source-map, and it works.

yuri-karadzhov commented 10 years ago

@rianmcguire I use chrome but still have this problem.

mikach commented 10 years ago

Just released v1.3.1. Does it still actual?

yyfearth commented 10 years ago

source-map updated to 0.1.37 seems solved the issue