jsx-loader icon indicating copy to clipboard operation
jsx-loader copied to clipboard

Source maps?

Open petehunt opened this issue 11 years ago • 11 comments

@sokra is this good?

petehunt avatar Jul 15 '14 17:07 petehunt

BTW it's potentially breaking right? 0.11 is still RC? Or did JSX not change?

gaearon avatar Jul 15 '14 17:07 gaearon

yes but i bumped jsx-loader version accordingly

petehunt avatar Jul 15 '14 17:07 petehunt

(i doubt anything actually breaks)

petehunt avatar Jul 15 '14 17:07 petehunt

Ah right I didn't notice -rc on the loader version.

gaearon avatar Jul 15 '14 17:07 gaearon

hmm.. i don't think it's good...

It need to be something like:

var result = ....transformWithDetails(...);
this.callback(null, result.code, result.map);

sokra avatar Jul 15 '14 18:07 sokra

@sokra are inline sourcemaps supported/

petehunt avatar Jul 15 '14 18:07 petehunt

only with the source-map-loader...

So it's better to return it directly... also better for performance...

sokra avatar Jul 15 '14 18:07 sokra

@petehunt I added source-map support in my fork here, but it just uses convert-source-map to extract the inlined source map, which I'm sure is far from optimal. Do you want me to create a pull request or do you have a better alternative in the works?

jRiest avatar Aug 22 '14 02:08 jRiest

I'm not really actively working on this so send a pr if it works!

petehunt avatar Aug 22 '14 03:08 petehunt

see https://github.com/jRiest/jsx-loader/commit/9a0bce47d0ae92937c6a0626a481ad822802857a#commitcomment-7486540

sokra avatar Aug 22 '14 07:08 sokra

@sokra that's much better. Thanks for pointing that out. I re-implemented sourcemaps using that method and submitted a pull request against this branch (sourcemaps) here

jRiest avatar Aug 26 '14 02:08 jRiest