搭建Electron + Vue 项目

前提

node的版本最好不要太高,本例子用的是v16.15.1
如果太高可以用n 切换版本,详见:https://blog.csdn.net/qq_38975827/article/details/112471115

搭建

  1. vue init webpack project_name
  2. vue add electron-builder
  3. npm run electron:serve

运行如果报错: vue-cli-service: command not found
yarn add @vue/cli-service

npm install @vue/cli-service --save-dev

你可能感兴趣的:(搭建Electron + Vue 项目)