-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Preserve log colors #2
Comments
@G-Rath looks like your environment might have an issue with Line 127 in 198bb13
This might be a situation in which we need your help to debug. I'm unable to reproduce it on my end. |
Probably a problem windows related, because on @shellscape mac and on my linux machines, this doesn't happen. I know some emulated terminals have problems to output some colors. Chalk under the hood uses the same |
@shellscape probably, but that was why I made the issue, as it's a bug for my environment. Sorry about not mentioning I was on Windows - I had meant to do that. I'm running Windows 10 Pro, and as my screenshots show, webpacks colors work fine 😉 Let me know what else I can do to help debug this problem. |
Cool.
You mean webpack-cli displays colors just fine 😉 We use Are you sure that your config isn't messing with that value in some way? (Perhaps webpack-cli is overriding that?) Give this a shot as well to make sure that the module thinks your env does in fact support color:
Aside from all that, we probably need you to inspect that line 127 I pasted before, to see what the return value of The value of whichever options are being passed to stats on this line Line 133 in 198bb13
|
Actually, pretty sure I mean webpack - if Note that the coloring for
Naturally I'm not sure, b/c I don't know the full impact of every configuration setting on the packages using it. I do know that my config isn't weird or trying to be clever in anyway, so I'd expect it to work.
Mine echos I'll take a look into logging the output of that line. |
I added this line above the one you mentioned to
The results: Since |
This is 🍌 s. What's the value of |
That's the problem: I have
Is there any reason why you don't merge those? I can solve this on my end by specifying |
Thanks for doing the dirty work there. That's really telling - we need a FAQ in the README for certain.
Yes! I'm so glad you posted this issue. So webpack-cli and webpack-command both do a lot of things that are opinionated. Turning on color for stats when it's not defined is one of those opinionated things. And because of that users have come to expect some opinionated things. In a twist, webpack itself does not default Now with webpack-nano, I chose to leave out the opinionated stuff. We're solely passing along the config as-is to webpack, with very few adjustments. Providing default stats options is kind of required for webpack, otherwise the output is even less-pretty - that is really walking the line on not being opinionated. But if a So after all that, I had thought that either |
Interesting that on that screenshot I posted, I didn't have colors anywhere on my config, nor an argument on cli. Whatelse could it be? |
@playma256 if you didn't define stats options in the config, webpack-nano uses a small default set of options, which turns on color if supported. |
Oh, so nvm. Makes sense |
I knew that was going to be your response :) I did notice that I'd argue that However I also understand that it's a very slippery slope, with as you said its walking a very fine line. Ultimately, My only other problem/bug with it right now is that it doesn't seem to output anything indicating it's noticed a file change - it just seems to output a blank line? But I'm unsure if that's a problem sitting with |
Open a super simple feature issue when you get the chance, and just include a screenshot of (probably webpack-cli or webpack-command) what you'd like to see similar, and we'll have a look at it. I use this (webpack-nano) with webpack-plugin-serve almost exclusively, and when files change and webpack rebuilds, I see additional build stats. But you're right in that nothing indicating a filesystem change otherwise is output. |
@shellscape I've made that issue as you requested (#3). It might actually be a feature for
Do you also use For me, setting I suspect that last one might be b/c the page reload means the socket discussions, but If you'd like to discuss these problems further, it might be easier take this to a chatroom or email-chain. Otherwise right now they're not preventing me from developing, and they might already be on your radar. Thanks regardless 😄 (btw, I'm pretty sure these are ^: Random idea - it could be super helpful if there was a base minimal example repo that already has |
Apologies for the short reply, but I'm about to head to bed for the night. I do use HMR with WPS. There's a test fixture that's wired up to an npm script you can go off of, it's at Head over to that repo and open a new issue (with a repo that's causing you trouble if possible) and we'll work through it. |
Expected Behavior / Situation
Colors emitted in webpack logs are preserved
Actual Behavior / Situation
Colors are not preserved by
webpack-nano
.Modification Proposal
It's a minor thing, but the colors make the logs easier to read:
vs.
The text was updated successfully, but these errors were encountered: