adambullmer / vue-cli-plugin-browser-extension

Browser extension development plugin for vue-cli 3.0
GNU Lesser General Public License v3.0
427 stars 76 forks source link

killing the watch starts tossing connection errors in the background script #47

Closed kinghat closed 5 years ago

kinghat commented 5 years ago

image

is ctrl+c not the proper way to kill the process? edit: looks like its with webpack-extension-reloader: https://github.com/rubenspgcavalcante/webpack-extension-reloader/issues/30

adambullmer commented 5 years ago

I think that's all to be expected if you kill the server that the front end expects to be running. Same thing happens with a normal vue server when you stop the npm run serve command and leave your website open. It's just more prolific here in an extension since it is always running

kinghat commented 5 years ago

im not sure how all of that works. is there a workaround or a better way to handle it other than removing the extension and loading it again?

adambullmer commented 5 years ago

Possibly on the webpack extension reloader side. I don't know their code well enough to make that claim for them. I think this is just one of those things that developers will have to deal with while we develop things.

Another workaround would be to run yarn build to generate a version of your code without the server.

kinghat commented 5 years ago

Another workaround would be to run yarn build to generate a version of your code without the server.

you mean to bypass running webpack-extension-reloader or to do it after you kill the process? because running it after you kill the process doesnt seem to help.

adambullmer commented 5 years ago

to bypass webpack-extension-reloader after you're done actively developing your extension. It's not great, but it at least removes the console errors

adambullmer commented 5 years ago

closing as there is nothing this package can do to resolve the issues. Errors lie with how every live reload server operates. The issues are more prominent because extensions can live on every page and continue to throw errors after dev builds have been killed