Using Uglify-JS debug prints wrong logs (with "color: #XXXXX" string)
See original GitHub issueI use ES6 plus browserify plus Babel plus optional uglify-js.
Example to show the problem:
import debug from 'debug';
const logger = debug('device');
logger.info('browser supported [flag:%s, name:"%s", version:"%s"]', flag, name, version);
When I do NOT use uglify-js
, everything is ok and the output is:
browser supported [flag:chrome, name:"Chrome", version:"64.0"]
However, when using `uglify-js, this happens:
browser supported [flag:color: #CC9933, name:"chrome", version:Chrome]
Which clearly shows that some wrong value is interpolated into the whole string and, somehow, "color: #CC9933"
is printed as first %s
argument.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Using Uglify-JS debug prints wrong logs (with "color: #XXXXX ...
I use ES6 plus browserify plus Babel plus optional uglify-js. Example to show the problem: import debug from 'debug'; const logger ...
Read more >Error Installing Discovery CLI - Secret Nodes
I get this permissions error when installing the Discovery CLI. xxxxx@DESKTOP-49GSI99:~$ npm i -g @enigmampc/discovery-cli
Read more >Installing karma with npm on Windows 8 - node.js
I'm attempting to install karma. The machine is windows 8.1. I have node v0.12.2 installed on the system. ... I'm unsure how to...
Read more >XSS (Cross Site Scripting) - HackTricks
In order to successfully exploit a XSS the first thing you need to find is a value controlled by you that is being...
Read more >ReleaseNotes01x01 < System < Foswiki
Module version strings and new module dependency in 1.1.6 and 1.1.7; Wysiwyg / TinyMCE ... error.log , debug.log ) is in a month...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It would be good if this was documented, its an obscure hack to work around this issue with debug, and its unlikely people will find it in this closed issue. Even more obscure if you don’t explicitly use Uglify, just the default webpack. I had to add the following to get it to work.
It would be even greater if libraries worked fine without depending on specific settings in other libraries. I think that’s better than “make it work for my use case, plz”.