-
Notifications
You must be signed in to change notification settings - Fork 83
Provide an option to disable clipboard integration? (Disable by default?) #33
Comments
🤣 best reproduction instructions ever. Let me dig up the request that prompted me to add that. It was based off of another popular project which did something similar, and I'd like to track that down and see how they handle the situation before we blaze a trail. I'm very open to modifying this, just want to poke around a bit first. |
OK tracked it down. The suggestion was made by @ooflorent based on what micro-dev provides. There's no existing logic there for how to handle this. However, I want to appeal to new users, but at the same time I'd like it to be sane. If it's interfering with people's work, then we're not helping with that feature. I also don't want to bog down the options with a ton of small properties (webpack-dev-server did this and it drove me nuts trying to maintain). So I'm good with being clever; disabling the copy if |
Also, just another mention related to this: The clipboard breaks on WSL (Windows Ubuntu) since it needs to connect to a display I think, which is not available on the WSL shell. |
Clipboard integration should be an opt-in feature because it can be harmful when you're uninformed (e.g. a new dev on a project). Defaults should be safe, and allow you to make optimizations as you learn how to configure. Let's make clipboard integration an opt-in feature. I'm happy to PR if this can be approved. |
@AndreasGalster when you say "breaks" do you mean that it throws an error and webpack-serve won't run? If so, please open a new issue. If not, are you just seeing the "could not copy" message in the console? @zenflow I really don't think that it's harmful nor intrusive as has been suggested. It's different, and different is scary. There are many things on a given user's machine that utilize the clipboard and you probably don't even realize it 😄 That said, I'm not ready to disable it by default. I was skeptical about adding the feature but find it incredibly useful now. I'd like to hear from @ooflorent, who originally suggested adding that and has experience with I do agree with @billyjanitsch that it's redundant when the |
I heavily use |
#40 was just merged and will allow setting a |
This is very unexpected, it should be opt-in. |
This issue is for a:
Code
CLI Command
$ webpack-serve
webpack.config.js
Expected Behavior
The clipboard integration is really cool, but in my 2 days of playing around with webpack-serve, it's bitten me several times: I've had something useful on my clipboard, and webpack-serve has overwritten it. (Since I usually use the
open
flag, even if my clipboard was empty, the feature wouldn't be useful for me anyway.)It surprised me that this happened by default, and there doesn't currently seem to be a way to disable it.
Would you take a patch that adds an option to configure this? Would you allow that patch to disable the behavior by default? (Depending on your stance on cleverness, it could even disable it by default only if
!!options.open
.)Actual Behavior
Any invocation of webpack-serve causes the clipboard to be overwritten with the server URL.
How Do We Reproduce?
The text was updated successfully, but these errors were encountered: