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

Source map path/filename issues #141

Closed
cguinnup opened this issue Dec 9, 2016 · 4 comments
Closed

Source map path/filename issues #141

cguinnup opened this issue Dec 9, 2016 · 4 comments

Comments

@cguinnup
Copy link

cguinnup commented Dec 9, 2016

When I updated from livereactload 2.2.2 to 3.1.1, the first thing I noticed was that my Typescript sourcemaps seemed to disappear. On closer examination, the sourcemaps are still intact, but console shows the path & filename of the compiled Javascript rather than the Typescript source filenames.

Also, the source browser is incredibly cluttered, with each file given its own separate directory prefaced by what looks like a GUID:

livereactload_3_1_1

When I revert to 2.2.2 these issues disappear. May be related to #127 ?

@milankinen
Copy link
Owner

Hmmm. I have never used LiveReactload with TS so hard to say... Do you have any minimalistic project with LiveReactload+TS combo re-producing this issue?

@cguinnup
Copy link
Author

I would have to create a minimal project, I don't have any on hand (and what I do have on hand is not FOSS).

The issue appears to be this line:
https://github.com/milankinen/livereactload/blob/master/src/browserify-plugin/main.js#L110
converter.setProperty('sources', [file.replace(basedir, hash)])

In that code, file is the filename given to Browserify (ex: filename.js). However, in all compile-to-JS languages, the source filename != the file given to Browserify. If I call converter.getProperty('sources') directly before that line, I see the appropriate Typescript filename & path.

The hashes in the path are a separate issue, and seem to be intentional based on this comment: #138 (comment)

@milankinen
Copy link
Owner

Fixed in 3.1.2. Can we close this issue?

@cguinnup
Copy link
Author

cguinnup commented Jan 3, 2017

Indeed. Thanks! :)

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

Successfully merging a pull request may close this issue.

2 participants