Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sourcemaps support #2

Closed
milankinen opened this issue Mar 28, 2015 · 6 comments
Closed

Add sourcemaps support #2

milankinen opened this issue Mar 28, 2015 · 6 comments

Comments

@milankinen
Copy link
Owner

Not high priority since no new lines are added by the transformer

@Chris-Andrews
Copy link

Hi, is this something you recently implemented? I am noticing a

//# sourceMappingURL=data:application/json;base64,...

string in my livereactload-ed page. I especially wanted to ask about this because your example gulpfile has the line:

sourcemaps = require('gulp-sourcemaps'),

I thought that line was guiding me to set up my own sourcemaps with gulp-sourcemaps (gulp-sourcemaps is never actually used in the sample gulpfile). I spent a couple hours trying to get things working that way and kept getting messages that my sourcemaps were pointing to files that could not be found. I finally decided to give up and then noticed that the sourceMappingURL line was being put in there. I have no idea how this is happening, but I currently have excellent source maps working.

It might help other people avoid making this same mistake if the require('gulp-sourcemaps') statement is removed from that sample gulpfile.

Thanks for providing such a great tool!

@milankinen
Copy link
Owner Author

Hi Chris,

Yeah, I forgot that dependency there. It'll be removed in the next release. Thanks!

@Chris-Andrews
Copy link

Thanks for clarifying

@jakubwolny
Copy link

That would be awesome if livereactload could reload sourcemaps during hot reload! Do you think is that possible?

@milankinen
Copy link
Owner Author

Actually it should support source maps - if you enable source maps from e.g. babelify then you'll be able to debug errors from you ES6 code.

However, existing breakpoints are not working because LiveReactload reload the whole bundle script (breakpoints apply to "old" bundle file). If you have disabled cache then you may be able to get around this by using preventCache option (see https://github.com/milankinen/livereactload#configuration-options).

@milankinen
Copy link
Owner Author

Not applicative anymore since 2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants