This article has participated in the Denver Nuggets Creators Camp 3 "More Productive writing" track, see details: Digg project | creators Camp 3 ongoing, "write" personal impact. How does Electron load the vue page
# 1, clone official demo2, project root directory to start if a window appears, it is successful. 3. Put in your own projects. The vUE project is packaged in the dist folder. Place the files in the folder at the root of the ELECTRON project. Let me run it again. 4, if
Electron, as we all know, consists of the main thread and the render process, with communication between them via IPC (more on this later). We create SRC and Pages folders in the Render folder and type them under the SRC folder
First, let's take a look at the life cycle in Electron. Here I found a very good article on Zhihu. Electron - Vue is a combination of vue- Cl
Umi structures, Electron App optimization way ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
1. Use nodemon hot update in package.json: 2. Console error: 'require' is undefine 3. The file cannot be obtained when showOpenDialog is used to open the file
TypeError: fs.existsSync is not a function in the React project const electron = require('electron'); Replace with:
Create the simplest Electron App to experience Electron. Generate the dist folder in the project root, dist/ MAC/electric-vue3. App is the executable file. We can also see that the generated file is relatively large, at 182MB.
If the leader suddenly said he needed to develop a front-end desktop application, it would be a natural thing for our front-end ER to choose Electron. But in fact, many students are not familiar with Electron. If we were suddenly asked to develop Electron, a lot of people would be confused and confused. Then rely on relatively little information on the Internet, slowly explore,...
Although B/S is the mainstream of current development, C/S still has a large market demand. Limited by the sandbox of the browser, Web applications cannot meet the requirements in some scenarios, while desktop applications can read and write local files and invoke more system resources. In addition, with the advantages of low cost and high efficiency of Web development, this cross-platform approach is increasingly favored by developers. Electron is based on a Ch...