Vue-cli-plugin-electron-builder: Changing default name

Created on 15 Jun 2020  路  6Comments  路  Source: nklayman/vue-cli-plugin-electron-builder

How can I rename my app from 'Electron' to anything I want?.

I have tried this solution https://github.com/electron/electron/issues/2543#issuecomment-133201841 but it only changes the 'title' from what I named my app(when creating the app with the Vue CLI), the 'Electron' still persists.

Most helpful comment

That should be the productName property. Try setting your vue.config.js to:

module.exports = {
  pluginOptions: {
    electronBuilder: {
      builderOptions: {
        productName: 'my-app-name'
      }
    }
  }
}

All 6 comments

The electron window title matches whatever your document title is, which is set in index.html The binary name is sourced from your package.json's name field. If you are trying to rename something other than those two let me know and I can tell you how to configure that.

Hi, @nklayman This name is what I'm trying to change. I have searched for the string 'Electron' in my file and there's nothing like that present there.
Screenshot 2020-06-15 at 11 28 14 AM

That should be the productName property. Try setting your vue.config.js to:

module.exports = {
  pluginOptions: {
    electronBuilder: {
      builderOptions: {
        productName: 'my-app-name'
      }
    }
  }
}

Thanks! this works.

It might be worth adding that the name doesn't get updated in development mode, it only changes after running yarn electron:build.

With this plugin, when in development mode,
Does that mean you can't change the title?

The app created with the vue2 series
Even if you set the title in vue.config.js or background.js
I'm wondering what to do because the title is still "Vue App"

The productName is for naming shortcuts for after your app is installed. Change the document title in public/index.html to change the window title.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fridzema picture fridzema  路  4Comments

u3u picture u3u  路  7Comments

itsMikeLowrey picture itsMikeLowrey  路  5Comments

grantdfoster picture grantdfoster  路  3Comments

nklayman picture nklayman  路  3Comments