electron-vue 打包踩坑

Vckin發表於2022-09-30

1,SyntaxError: Identifier ‘tasks’ has already been declared

解決:將build.js tasks 重新命名

    //const tasks = ['main', 'renderer']
    const tasks1 = ['main', 'renderer']
    //const m = new Multispinner(tasks, {
      const m = new Multispinner(tasks1, {
        preText: 'building',
        postText: 'process'
      })

2, ReferenceError: Multispinner is not defined

解決:

    //安裝 multispinner
    yarn add multispinner -D

在build.js忠引入

    const Multispinner = require('multispinner')

electron-vue 打包踩坑

yarn config set registry https://registry.npm.taobao.org
本作品採用《CC 協議》,轉載必須註明作者和本文連結