mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-18 00:34:19 +08:00
🎉 初始化项目 electron13 + vue3 + typescript
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const path = require('path');
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
configureWebpack: {
|
||||
@@ -9,16 +9,58 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
pages: {
|
||||
index: {
|
||||
entry: "src/renderer/main.ts",
|
||||
},
|
||||
},
|
||||
pluginOptions: {
|
||||
electronBuilder: {
|
||||
mainProcessFile: 'src/main/index.ts',
|
||||
mainProcessFile: "src/main/index.ts",
|
||||
mainProcessWatch: ["src/main"],
|
||||
// Use this to change the entry point of your app's render process. default src/[main|index].[js|ts]
|
||||
builderOptions: {
|
||||
// options placed here will be merged with default configuration and passed to electron-builder
|
||||
},
|
||||
chainWebpackRendererProcess: (config) => {
|
||||
config.entryPoints.clear(); // 清空默认入口
|
||||
config.entry('test').add(path.join(__dirname, "./src/renderer/main.ts")); // 重新设置
|
||||
productName: "rubick2",
|
||||
appId: "com.muwoo.rubick",
|
||||
compression: "maximum",
|
||||
directories: {
|
||||
output: "build",
|
||||
},
|
||||
files: ["dist/electron/**/*"],
|
||||
dmg: {
|
||||
contents: [
|
||||
{
|
||||
x: 410,
|
||||
y: 150,
|
||||
type: "link",
|
||||
path: "/Applications",
|
||||
},
|
||||
{
|
||||
x: 130,
|
||||
y: 150,
|
||||
type: "file",
|
||||
},
|
||||
],
|
||||
},
|
||||
mac: {
|
||||
icon: "build/icons/icon.icns",
|
||||
target: "pkg",
|
||||
extendInfo: {
|
||||
LSUIElement: 1,
|
||||
},
|
||||
},
|
||||
win: {
|
||||
icon: "build/icons/icon.ico",
|
||||
target: "nsis",
|
||||
},
|
||||
nsis: {
|
||||
oneClick: false,
|
||||
allowToChangeInstallationDirectory: true,
|
||||
},
|
||||
linux: {
|
||||
icon: "build/icons/",
|
||||
publish: ["github"],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user