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

Is it possible to add a field to disable AutoLaunch? #135

Closed
HereOrCode opened this issue Sep 30, 2023 · 8 comments · Fixed by #136
Closed

Is it possible to add a field to disable AutoLaunch? #135

HereOrCode opened this issue Sep 30, 2023 · 8 comments · Fixed by #136
Labels

Comments

@HereOrCode
Copy link

Why add the disableAutoLaunch field?

disableAutoLaunch: true // Do not auto-open the browser
disableAutoLaunch: false // Auto open the Browser

For example:

https://github.com/aklinker1/vite-plugin-web-extension/blob/161921596f71f760a30d18a3a355de31f2bba97e/packages/vite-plugin-web-extension/src/index.ts#L19


I set disableAutoLaunch to true and manually loaded the chrome-mv3 directory for development so that I could easily debug the background.js

shot0

Currently using WXT, and I've encountered a debugging issue: How to debug background.js?

shot1

@aklinker1
Copy link
Collaborator

@code4you2021 you need to enable dev mode in chrome to see the inspect view. You've done it in your personal profile, but not the blank profile that web-ext opens in by default.

I'll add this feature, because there are other cases where this is useful, but in your case, you just need to toggle the switch in the top right corner of chrome://extensions.

Screen.Recording.2023-09-30.at.8.24.54.AM.mov

I'll look into seeing if it's possible to enable this setting by default when opening the browser from WXT.

@aklinker1
Copy link
Collaborator

Released in v0.6.6. See #136 for how to disable opening the browser automatically.

@HereOrCode
Copy link
Author

@aklinker1

I found a problem, when disable is true, the output folder is hidden.

Can it be a visible directory?

disable: true // out folder visible (output/chrome-mv3)
disable: false // out folder hidden (.output/chrome-mv3)

@aklinker1
Copy link
Collaborator

aklinker1 commented Oct 1, 2023

@code4you2021 The output folder is visible in the output file list, regardless of runner.disabled.

runner.disabled: false

Screenshot 2023-09-30 at 9 42 27 PM

runner.disabled: true

Screenshot 2023-09-30 at 9 44 31 PM

@aklinker1
Copy link
Collaborator

aklinker1 commented Oct 1, 2023

Oh, I see what you mean, it's a hidden directory that starts with a dot.

I think you're mistaken, it's always a hidden directory, regardless of runner.disabled. This directory is hard coded that way

I don't plan on making it a non-hidden directory. I might add a config option for it though.

If you have trouble opening the directory, most terminals will let you ctrl+click a directory to open it in the system file explorer. Editors also let you open a file's location in the system file explorer.

@HereOrCode
Copy link
Author

I'm sorry I didn't express myself very clearly

If runner.disabled is set to true and the out folder is hidden, chrome will not load the out folder.

@aklinker1
Copy link
Collaborator

aklinker1 commented Oct 1, 2023

No worries! On Mac, cmd+shift+. will show hidden files.

Screen.Recording.2023-09-30.at.11.32.04.PM.mov

You can also drag and drop the directory onto the chrome://extensions

Screen.Recording.2023-09-30.at.11.34.50.PM.mp4

@HereOrCode
Copy link
Author

Thanks.

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

Successfully merging a pull request may close this issue.

2 participants