kwelch / babel-plugin-captains-log

Babel plugin that injects helpful details into console statements
MIT License
85 stars 7 forks source link

Allow css styling in template literals #65

Open mqklin opened 1 year ago

mqklin commented 1 year ago

For some reason, this code doesn't work:

console.log(`%c ${123}`, 'color:red');

(it logs %c 123 color:red) But if I turn-off the plugin, it works as expected.

kwelch commented 1 year ago

I was not aware of the string substitutions within console functions. This is pretty sweet. Are you open to attempting to put in a fix for this?

mqklin commented 1 year ago

I'll try to take a look this week.