Closed stigvanbrabant closed 5 years ago
@stigvanbrabant which browser are you using?
@franciscolourenco I'm using google chrome (76.0.3809.46 beta)
HMR is not supported at this time. It is a limitation of https://github.com/rubenspgcavalcante/webpack-chrome-extension-reloader and https://github.com/rubenspgcavalcante/webpack-extension-reloader
There isn't really a workaround, other than manually refreshing the page or closing & reopening the popup. Also not ideal, but you could prototype UI work in a more typical vue application setup, and then incorporate into your extension once it's ready for use in there.
closing due to inactivity
Your last suggestion seems like a good one. How do I add the standard VUE-CLI hot reload support to a project with this plugin so I can serve static/index.html as usual? Wondering what the easiest way would be.
Thank you for making this plugin available 👍
I think I got it working. Ran vue-cli-service
serve and had to add a config to vue.config.js
for Webpack's HTML plugin for it to work and render titles correctly.
chainWebpack: (config) => {
config
.plugin('html')
.tap(args => {
args[0].title = 'App title'
return args
})
},
In src/main.js
:
import App from './components/myApp.vue'
There's one issue – I keep getting these errors since I'm loading it from index.html and not as an extension. Any suggestions?
You are trying to load background.js in a normal tab?
It happens when I run vue-cli service
. I need to modify the webpack config not to include background.js when I run it for standalone use (served as a regular app). Pointers are most welcome.
The hot reloading seems to work when using the popup, but i can't get it to work with content scripts. I always need to manually reload the extension, any known solutions?