The generated background script logs Hello undefined! instead of Hello bar! if the plugin is installed into a project where the user installed Vuex on project creation.
This is because Vue CLI generates a store.js file and since the background script imports ./store, Webpack imports store.js instead of store/index.js.
Decided I'll just go ahead and remove vuex/vue router from the scaffolding to keep things simple, and put out an example repo to show how it can all be put together
The generated background script logs
Hello undefined!
instead ofHello bar!
if the plugin is installed into a project where the user installed Vuex on project creation.This is because Vue CLI generates a
store.js
file and since the background script imports./store
, Webpack importsstore.js
instead ofstore/index.js
.