electron-vue comes packed with the following
vue plugins that can be installed during
- axios (web requests)
- vue-electron (attach electron APIs to Vue object)
- vue-router (single page application routes)
- vuex (flux-inspired application architecture)
Promise based HTTP client for the browser and node.js
If you are familiar with
axios will feel very familiar as most of the API is nearly identical. You can easily import
axios in your
main process scripts or use with
Vue.http in the
renderer process. Please note that during development you may run into issues with CORS since requests are passed through
webpack-dev-server. As a small workaround, you can disable
webSecurity within the BrowserWindow configuration, but please do remember to only disable this during development. Disabling this in production is highly not recommended and can create a serious security risk for your final application!
The vue plugin that attaches electron APIs to the Vue object, making them accessible to all components.
vue plugin that makes electron APIs easily accessible with
this.$electron, no longer needing to import
electron into every component necessary.
vue-routeris the official router for Vue.js. It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze.
The provided project structure should feel familiar to the setup provided in the official
Vuex is a state management pattern + library for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion.
The provided project structure is rather bare but does encourage the use of
vuex's module pattern to help organize your data stores. The extra
@/store/modules/index.js let's your
vuex store import all modules in a one-shot manner.