How to access electron "app" from vue?
See original GitHub issueI’d like to display the app version in my ui. The version should come from package.json. However I can’t seem to access app from within my renderer components.
I’ve tried
<script>
import app from 'electron'
export default {
data () {
return {
appVersion: app.getVersion()
}
},
I was considering importing package.json to read it directly from there but I’m not sure if this will work both in dev and build since package.json doesn’t get packaged (I’m using electron-builder)?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Building an app with Electron and Vue - LogRocket Blog
If you've worked with Vue before, it's simple to get started with Electron. Use the Vue CLI plugin for Electron Builder and make...
Read more >Building Desktop Apps With Electron And Vue
This tool allows you to build Vue apps for desktop with Electron, this means that it makes your Vue application work as an...
Read more >Create an Electron application with Vue and Vuetify - ITNEXT
With the help of Vue CLI you can now easily prepare the project. To do this, enter the following command: vue create vue-electron-app....
Read more >Building a Desktop App with Electron and Vue.js - Buddy.Works
First, Node and NPM are required for developing and building your application. You can download both of them from the official website. You...
Read more >Building an Electron App with VueJS and Vite
Their claim is to run the command vue add electron-builder to your existing application created using Vue CLI 3 or 4 and that's...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My mistake, I for some reason thought
appwas a shared module. You’ll need to access it fromremote. In development you’ll probably get the version ofelectronbeing used, but in production you should get the version frompackage.json.Is that safe to use this approach of @n82, @SimulatedGREG ?