No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Tips on upgrading to Electron v5

    Announcements
    2
    4
    493
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rstoenescu
      rstoenescu Admin last edited by

      Hi All,

      If you are building desktop apps then this is for you.

      For upgrading from Electron < 5 to v5+ you will need to edit your src-electron/main-process/main.js at this location:

      mainWindow = new BrowserWindow({
        width: 1000,
        height: 600,
        useContentSize: true,
      
        /**********************
         * ADD THE FOLLOWING: *
         **********************/
        webPreferences: {
          nodeIntegration: true
        }
      })
      

      This is due to a breaking change in Electron v5 which disables node integration by default.

      Enjoy!

      1 Reply Last reply Reply Quote 4
      • bjbk
        bjbk last edited by

        Thanks! I understand that one will have to change the dependency in the package.json to v5 manually in order to update from v4?

        1 Reply Last reply Reply Quote 1
        • rstoenescu
          rstoenescu Admin last edited by

          @bjbk Yes. But please read the Electron release notes first. See if you really want the update and that you fully grasp the changes.

          1 Reply Last reply Reply Quote 1
          • bjbk
            bjbk last edited by

            @rstoenescu understood. Thank you!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post