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

Background script logs 'Hello undefined!' if the plugin is installed into a project with Vuex #18

Closed siphomateke closed 5 years ago

siphomateke commented 6 years ago

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.

adambullmer commented 5 years ago

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