After doing some deep thinking, I stumbled upon the vue-cli-service
-binary. This nifty binary allows for project monitoring and app rebuilding when necessary. By default, vuecli
will generate files in the dist
directory where I also placed my manifest.json
, contentScript.js
, and backgroundScript.js
files. Executing the following command will trigger the app to rebuild when needed, enabling a form of hot-reloading (opening and closing the popup). Build times are impressively quick for a small app (~200ms).
vue-cli-service build --watch --no-clean
Additionally, you may need to turn off eslint
on save (refer to this) as it might throw errors related to not finding chrome
. Afterwards, load the unpacked extension into a fresh Chrome session and proceed with testing using developer tools. Unfortunately, I'm still struggling to make Vue Devtools
work with the extension.
This method works well for me: I can effectively develop Chrome extensions powered by vuejs
. However, I am curious if anyone has alternative workflows or suggestions for improvement?
UPDATE:
@tony19's solution seems to be the recommended approach.