andreypopp / reactify

[DEPRECATED] Browserify transform for JSX (superset of JavaScript used in React library by Facebook)
MIT License
690 stars 68 forks source link

Source maps include full local path names, not shown in original folders #68

Closed davepile closed 9 years ago

davepile commented 9 years ago

When I bundle with this command - watchify main.js -t reactify -o bundle.js -v -d the source file names appear in devtools with the file name including the full local file path and they are not shown in their nested folders.

This causes a few problems with many files as it is hard to see which file you are looking at.

I have posted a SO question which includes some screenshots that might help explain what I mean.

Is there a solution to this or am I doing something wrong? Thanks (If cross posting or linking etc. is frowned upon let me know and I will remedy- i am new to issues on github)

davepile commented 9 years ago

I had someone answer this on the SO question.

It was a browserify option that fixed the issue- adding --full-paths=false to the command worked. This is the final command that worked for me.

watchify main.js -t reactify -o bundle.js -v -d --full-paths=false

zertosh commented 9 years ago

@davepile You're probably using an old version of watchify. Prior to 2.5.0, fullPaths was required for the caching to work, thus the CLI automatically added it. If you update to a newer version, you won't have to set --full-paths to false, since that's already the default.

EDIT: https://github.com/substack/watchify/pull/160

davepile commented 9 years ago

@zertosh - I have watchify 2.5.1 installed globally and in the project