question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v2.0.0: Rename "background.js" to "main.js" and "main.js" to "renderer.js"

See original GitHub issue

Wouldn’t it make more sense to call main process as main.js and renderer process as renderer.js? Right now it’s kind of backwards.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
AssetKidcommented, Dec 22, 2019

I personally think it is fine. With that said, it is easy to achieve this in your project.

// vue.config.js

module.exports = {
  pages: {
    index: {
      entry: 'src/renderer.js' // Previously main.js
    }
  },
  pluginOptions: {
    electronBuilder: {
      mainProcessFile: 'src/main.js' // Previously background.js
    }
  }
}
1reaction
nklaymancommented, Feb 17, 2020

@AlexSHoffman You should only have to update the vue.config.js. Can you try following @AssetKid’s suggestion with a blank repo? If it doesn’t work can you upload it to Github and post a link so I can fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron js Tutorial - 3 - Main and Renderer Process - YouTube
Electron js Tutorial - 3 - Main and Renderer Process ; Courses - https://learn.codevolution.dev/ ; Support UPI - https://support.
Read more >
How to communicate between other.js and background.js in ...
What you are looking for is: import {ipcRenderer} from 'electron'; instead of import ipcRenderer from 'electron';.
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax. A background on modules. JavaScript programs started off pretty ......
Read more >
Building Desktop Apps With Electron And Vue
In this tutorial, Timi Omoyeni explains what you need to keep in mind when building a desktop application with Vue.js using the Vue...
Read more >
Common mistakes to avoid while working with Vue.js
Include template compiler. My first issue was a pretty basic one. The first thing to do in order to use Vue.js is to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found