jsoverson / preprocess

Preprocess HTML, JavaScript, and other files with directives based off custom or ENV configuration
Other
366 stars 80 forks source link

Missing Support for Source Maps #59

Open naeramarth7 opened 9 years ago

naeramarth7 commented 9 years ago

Couldn't find anyone complaining about this, so I had to open this Issue eventually, though I guess I'm not the only one struggling with this.

When preprocessing scripts and styles with gulp (or grunt - doesn't matter), I do also set up source maps. However preprocess does not support them and therefore wrong line numbers (and even wrong files) are returned.

screen shot 2015-06-05 at 10 13 47 pm

My current workaround is initialising source maps _after _ preprocessing files. This does at least show me the code that is executed, however I can't connect my local files in the Chrome Dev Tools sources and have to search for the executed code by hand.

Frizi commented 9 years ago

:+1: This is required to run any test coverage tool.

Alphapage commented 8 years ago

The easiest way would be to not remove lines, but instead comment or blank lines. An option could be passed like removeLines: false to keep sourcemaps.

sheinzle commented 8 years ago

+1

@Alphapage's suggestion with removeLines would be the quickest fix

Izhaki commented 7 years ago

+1

glen-84 commented 7 years ago

Why the downvote @glen-84?

Because it notifies all subscribers, without adding any value.

You should instead add a reaction to the first comment.

Izhaki commented 7 years ago

@glen-84 Oh my... and to think I've learnt it just now. Thank you so much for pointing it out...