, cannot found module when electron packages a vue project

problem description

I try to package vue"s official demo (hello word), with electron. Follow this tutorial https://blog.csdn.net/j_bleac.
my project directory structure:

//
electron.js
const { app, BrowserWindow } = require("electron")
/*const electron = require("electron");
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;*/
const url = require("url")
const path = require("path")
// Keep a global reference of the window object, if you don"t, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win

function createWindow () {


}

// Electron
//
// API ready
app.on("ready", createWindow)

//
app.on("window-all-closed", () => {


})

app.on("activate", () => {


})

//
// require

package.json
{
"name": "tele",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "moquan0116 ",
"private": true,
"scripts": {


},
"dependencies": {


},
"devDependencies": {


},
"engines": {


},
"browserslist": [


]
}

Menu