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

fix: remove --debug flag for browserify. #66

Closed
wants to merge 1 commit into from

Conversation

mprobst
Copy link
Collaborator

@mprobst mprobst commented May 28, 2015

According to the spec (https://goo.gl/UQJKOW) the source map comment should be
at the very end of the file. Browser's adhere to that, i.e. use the last source
map in the file.

Browserify's --debug adds a source map at the bottom of the compiled file, but
currently fails to combine that with the source map referenced in script.js.
This is a bug in Browserify, see issue
browserify/browserify#772.

Our test case thus only worked by accident, for the user in the browser only
"script.js" shows up, not "script.coffee" as it should.

So for the time being, we should just remove the --debug flag from the build and
re-enable once browserify fixes that issue.

According to the spec (https://goo.gl/UQJKOW) the source map comment should be
at the very end of the file. Browser's adhere to that, i.e. use the last source
map in the file.

Browserify's --debug adds a source map at the bottom of the compiled file, but
currently fails to combine that with the source map referenced in script.js.
This is a bug in Browserify, see issue
browserify/browserify#772.

Our test case thus only worked by accident, for the user in the browser only
"script.js" shows up, not "script.coffee" as it should.

So for the time being, we should just remove the --debug flag from the build and
re-enable once browserify fixes that issue.
@mprobst
Copy link
Collaborator Author

mprobst commented May 28, 2015

This unblocks issue #60.

@evanw
Copy link
Owner

evanw commented May 29, 2015

Hmm, interesting. I don't use browserify myself so I wasn't aware of this. I'd rather leave the test broken so that we can tell when the issue is fixed. Removing the --debug flag also doesn't seem like a good idea since it sounds like it's an unsupported workflow and won't work if more than one source file uses a source map. The flag is only used in generating browserify-test and shouldn't affect the module itself.

Copy link

@Cunero Cunero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

3 participants