aklinker1 / vite-plugin-web-extension

Vite plugin for developing Chrome/Web Extensions
https://vite-plugin-web-extension.aklinker1.io/
MIT License
537 stars 46 forks source link

Typing `R` in dev mode restarts dev server but doesn't re-open browser #138

Open aaronklinker-st opened 10 months ago

aaronklinker-st commented 10 months ago

Summary

Typing R in the console during dev mode in regular vite projects is a quick way to restart the dev mode experience without stopping the original pnpm dev command. I would expect that the browser is re-opened when the server starts back up in dev mode.

Reproduction

pnpm create vite-plugin-web-extension --template vue test-project
cd test-project
pnpm i
pnpm dev
# Type R once the first dev build has finished, the browser will close and not open again

Environment

  System:
    OS: macOS 12.6.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 2.78 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.asdf/installs/nodejs/18.12.1/bin/node
    Yarn: 1.22.19 - ~/.asdf/installs/nodejs/18.12.1/bin/yarn
    npm: 8.19.2 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 116.0.5845.96
    Edge: 115.0.1901.203
    Firefox: 103.0.1
    Firefox Developer Edition: 117.0
    Safari: 16.6
  npmPackages:
    vite: ^4.3.6 => 4.3.9 
    vite-plugin-web-extension: ^3.1.2 => 3.1.2