From da138ecbd08a7154e8ea3e220541bd6c5fe6554b Mon Sep 17 00:00:00 2001 From: caorushizi <84996057@qq.com> Date: Sat, 17 Jun 2023 19:29:25 +0800 Subject: [PATCH] pack --- package.json | 2 +- packages/main/script/release.mjs | 2 +- packages/main/src/services/WebServiceImpl.ts | 5 +++-- packages/mobile/components.d.ts | 1 - packages/mobile/vite.config.ts | 5 +++++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cd4c724..7699a8e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "dev": "pnpm -r --parallel -F main -F renderer -F mobile run dev", - "build": "pnpm -r --parallel -F main -F renderer run build", + "build": "pnpm -r --parallel -F main -F renderer -F mobile run build", "pack": "pnpm -F main run pack", "release": "pnpm run build && pnpm -F main run release" }, diff --git a/packages/main/script/release.mjs b/packages/main/script/release.mjs index 7a324fa..11d220f 100644 --- a/packages/main/script/release.mjs +++ b/packages/main/script/release.mjs @@ -11,7 +11,7 @@ if (semver.neq(process.env.APP_VERSION, packageJson.version)) { process.exit(0); } -const extraResources = []; +const extraResources = ["build/mobile/**/*"]; if (process.platform === "win32") { // windows extraResources.push("bin/ffmpeg.exe", "bin/N_m3u8DL-CLI_v3.0.2.exe"); diff --git a/packages/main/src/services/WebServiceImpl.ts b/packages/main/src/services/WebServiceImpl.ts index aacb3e3..82cd85e 100644 --- a/packages/main/src/services/WebServiceImpl.ts +++ b/packages/main/src/services/WebServiceImpl.ts @@ -24,8 +24,9 @@ export default class WebServiceImpl implements WebService { ) { this.app = new Koa(); this.router = new Router(); - this.baseUrl = `http://${getLocalIP()}:${process.env.APP_SERVER_PORT - }/video/`; + this.baseUrl = `http://${getLocalIP()}:${ + process.env.APP_SERVER_PORT + }/video/`; } async init(): Promise { diff --git a/packages/mobile/components.d.ts b/packages/mobile/components.d.ts index cb9152b..9c7e6e7 100644 --- a/packages/mobile/components.d.ts +++ b/packages/mobile/components.d.ts @@ -9,7 +9,6 @@ declare module 'vue' { export interface GlobalComponents { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - VanButton: typeof import('vant/es')['Button'] VanCell: typeof import('vant/es')['Cell'] VanEmpty: typeof import('vant/es')['Empty'] VanList: typeof import('vant/es')['List'] diff --git a/packages/mobile/vite.config.ts b/packages/mobile/vite.config.ts index 80946db..7cf8adc 100644 --- a/packages/mobile/vite.config.ts +++ b/packages/mobile/vite.config.ts @@ -1,4 +1,5 @@ import { fileURLToPath, URL } from 'node:url' +import path from 'path' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' @@ -24,5 +25,9 @@ export default defineConfig({ server: { host: true, port: 8556 + }, + build: { + outDir: path.resolve(__dirname, "../main/build/mobile"), + emptyOutDir: true, } })