samrum / vite-plugin-web-extension

A vite plugin for generating cross browser platform, ES module based web extensions.
MIT License
323 stars 33 forks source link

Make opening browser optional #120

Open peterhil opened 1 year ago

peterhil commented 1 year ago

I am using FreeBSD for development, and just spent two days to convert bundling from Rollup to Vite, because this plugin seemed promising for handling V3 manifest inconsistencies.

Only after I got that done, I realised that this plugin always opens a browser on dev mode using web-ext, which does not support FreeBSD. So PLEASE make this feature optional through config.

Bit tired of this...

aleksolutions commented 1 year ago

Why don't you just remove that part of the script from the package.json?

peterhil commented 1 year ago

I was not using web-ext on the package.json script, but just this plugin, which under the uses web-ext and tries to open a web browser after building on dev mode. That's why opened this issue.

samrum commented 1 year ago

This plugin doesn't use web-ext at all.

If you used npm init @samrum/vite-plugin-web-extension@latest to generate a template extension, that'll use web-ext to open a browser when you use run serve:chrome or serve:firefox, but nowhere else.

If you're seeing a browser open some other way, this plugin isn't doing it.