Closed henrikvilhelmberglund closed 3 weeks ago
I think this feature is not very useful
You can implement this feature by adding your plugin to the plugin list of vite.config.ts
maybe you just want like this
chrome "D:\User\Documents\Project\vite-plugin-monkey\playground\solid-ts\dist\solid-ts.user.js"
maybe you just want like this
chrome "D:\User\Documents\Project\vite-plugin-monkey\playground\solid-ts\dist\solid-ts.user.js"
I tested something like this but I end up with an empty page which was also a bit annoying, but I can just use my fork.
This PR adds a
server.closePreviewAutomatically
option (defaultfalse
) which automatically closes the preview server (npm run preview
) after 3000ms (arbitrary number).No idea if this is something anyone wants (feel free to close if not) but to me it seems like the preview server is only used for getting the script data to the extension so might as well close it automatically to make going from dev to build and back a bit smoother.
I also have no idea what I'm doing so feel free to edit.
Usage:
vite.config.ts
package.json
(not needed but can be nice)Run
npm run build
, it builds, previews to let you reimport the script and closes automatically. Voila!