Electron Vue electron-builder 打包错误: InvalidConfigurationError: ‘build’ in the application package.json is not supported since 3.0 anymore. Please move ‘build’ into the development package.json

解决方案:把"build":{}从package.json移除,在vue.config.js里写

module.exports = {
  runtimeCompiler: true,
  pluginOptions: {
    electronBuilder: {
      builderOptions: {
        // build配置在此处
        // options placed here will be merged with default configuration and passed to electron-builder

      }
    },
  },
};

参考链接:

https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/171
https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/configuration.html#table-of-contents
https://www.electron.build/configuration/configuration

Logo

前往低代码交流专区

更多推荐