Fix for sourcemap file locations#481
Conversation
| "lib" | ||
| "src" | ||
| ], | ||
| "main": "lib/index.js", |
There was a problem hiding this comment.
can you please revert this. lib is correct.
There was a problem hiding this comment.
Ah I see, because the build script outputs to /lib. I mainly made this change so I could install from my git branch for testing and didn't really think about it.
That may also explain why it isn't working with Node <8.0. I still have to do some testing of this today, but I'll revert that.
There was a problem hiding this comment.
It looks like using a proper build tarball fixed my issues and everything is working again. Thanks for that.
4990e74 to
6d0e9ed
Compare
babel-loader was setting `options.sourceFileName` to a relative path, but this does not seem to work correctly anymore with either webpack or babel itself and causes incorrect source map file data in webpack. Setting it to an absolute path seems to fix the problem. Fixes babel#480 and possibly also babel#93.
6d0e9ed to
38ed9a3
Compare
|
@michael-ciniawsky I'm unclear what you're referring to. Do you mean this shouldn't be assigned to |
|
According to @sokra |
|
@michael-ciniawsky you are correct that sourceRoot doesn't need to be set. However for the absoluteResourcePath to not simple return the filename the sourceFileName must be set to At least that's what my testing showed. @danez is there anything else I need to do for this PR? |
|
@danez are any other changes required for this. @michael-ciniawsky I've tested this and it does work with sourceRoot set to '' or unset, but it still requires that the sourceFileName be set to the absolute path of the file. It doesn't seem to matter what the sourceRoot is set to. |
|
@danez hey I'm sure your busy, so I'd be happy to take care of any work necessary to get this merged in. Is there anything I can do? |
|
Still hoping to see this merged sometime. Right now we are packaging the fix manually to make sure source maps work. |
babel-loader was setting
options.sourceFileNameto a relative path, but this does not seem to work correctly anymore with either webpack or babel itself and causes incorrect source map file data in webpack.Setting it to an absolute path seems to fix the problem.
Fixes #480 and possibly also #93.