From 76c044746451a3f8327476f2c04d8b7d23caf090 Mon Sep 17 00:00:00 2001 From: aoirint Date: Sat, 25 Sep 2021 02:42:29 +0900 Subject: [PATCH] add VOICEVOX_ENGINE_DIR env for electron-builder --- vue.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index dd60d17197..669d091ed2 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,10 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires const path = require("path"); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const process = require("process"); + +const VOICEVOX_ENGINE_DIR = + process.env.VOICEVOX_ENGINE_DIR ?? "../voicevox_engine/run.dist/"; module.exports = { configureWebpack: { @@ -19,7 +24,7 @@ module.exports = { extraFiles: [ { from: ".env.production", to: ".env" }, { - from: "../voicevox_engine/run.dist/", + from: VOICEVOX_ENGINE_DIR, to: "", }, ],