browserify-ngannotate icon indicating copy to clipboard operation
browserify-ngannotate copied to clipboard

Sourcemaps support is broken

Open lgringo opened this issue 10 years ago • 8 comments

Since version 0.7, sourcemaps are not relative paths anymore. Was working perfectly before.

Step to reprodruce 1/ Write a small AngularApp using browserify 2/ Create the bundle using "browserify --debug -t browserify-ngannotate myapp.js > bundle.js" 3/ Decode generated sourceMaps : "tail -1 bundle.js | cut -b 65- | base64 --decode NB You need to count the number of characters to exclude (65 in my example)

With browserify-ngannotate 0.6 : Path to source are relative With browserify-ngannotate 0.+7+: Path to source are absolute

When serving the app with http server, absolute sources can't be retrieved. Paths should remain relative.

lgringo avatar May 30 '15 10:05 lgringo

You can find a test project here : https://github.com/lgringo/test-browserify-ngannotate

lgringo avatar May 30 '15 22:05 lgringo

Think I got this in 1.0.0, let me know

omsmith avatar May 31 '15 17:05 omsmith

Great job !

Version 1.0.0 works like a charm.

lgringo avatar May 31 '15 21:05 lgringo

Sadly, I'm pretty sure this is now much more broken than before.

Gave omsmith/browserify-1192 a test, and duplicate filenames are overwritten. Seems the solution is to just be able to provide a sourceroot, which may come for free.

I'll be reverting this particular change later in the day.

omsmith avatar Jun 01 '15 14:06 omsmith

@omsmith Is this related to browserify coughing things back up with:

Cannot read property 'match' of undefined while parsing file:

nathanmarks avatar Sep 11 '15 17:09 nathanmarks

@nathanmarks We're seeing that same problem, though only for npm linked modules.

pmowrer avatar Sep 17 '15 19:09 pmowrer

Turns out this was our own fault. Due to our Browserify configuration mixed with npm linked modules, the browserify-ngannotate transform was applied to the same files twice.

pmowrer avatar Sep 17 '15 21:09 pmowrer

So this is actually resolved?

TehShrike avatar Feb 18 '16 21:02 TehShrike