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

a problem of '--debug' option #753

Closed
AnnieCyl opened this issue May 6, 2014 · 6 comments
Closed

a problem of '--debug' option #753

AnnieCyl opened this issue May 6, 2014 · 6 comments
Labels

Comments

@AnnieCyl
Copy link

AnnieCyl commented May 6, 2014

When I built my bundle using --debug options, I got messy code with Chinese characters in source maps, like this:
qq20140520143417

All my js files are UTF-8. Here is my command:
browserify --debug -r ./main.js > bundle.js

But it is all normal in the bundle.js:
2

This problem only happens when I look into the separated source files.
How can I fix it?

@ghost
Copy link

ghost commented May 6, 2014

Can you post the input files someplace so I can replicate the issue?

@AnnieCyl
Copy link
Author

AnnieCyl commented May 6, 2014

@substack
You can check out these files here:
https://github.com/snowman002000/myrepository

@AnnieCyl
Copy link
Author

@substack
I add charset=utf-8 to the sourceMappingURL in the bundle.js like this:
//# sourceMappingURL=data:application/json;charset=utf-8;base64, ...

Or, I modified the source code of browserify in browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js, like this:
qq20140526094138

and the problem is gone.

@thlorenz
Copy link
Collaborator

interesting find, could you please file an issue with the inline-source-map module?
IMO we need to fix it there.

It'd be great if you could provide a failing test, but even an isolated example with some chinese characters would be helpful.

@terinjokes
Copy link
Contributor

@csbun
Copy link

csbun commented Aug 11, 2015

upgate combine-source-map to 0.7.1 in browser-pack since inline-source-map fixed it on 0.6.0

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

No branches or pull requests

4 participants