From 1cd830268ac852a1cd256915750aad23e7118918 Mon Sep 17 00:00:00 2001 From: hejl Date: Fri, 29 Aug 2025 14:09:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- gofaster/app/dev-enhanced.ps1 | 10 +++++++++- gofaster/dev-full.ps1 | 8 ++++---- gofaster/start.ps1 | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index d7b922c..14bd449 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ /gofaster/app/dist /gofaster/backend/logs /gofaster/tmp/ -/gofaster/app/dist/*/*/ \ No newline at end of file +/gofaster/app/dist/*/*/ +/gofaster/backend/tmp diff --git a/gofaster/app/dev-enhanced.ps1 b/gofaster/app/dev-enhanced.ps1 index 86b0c61..42c9d54 100644 --- a/gofaster/app/dev-enhanced.ps1 +++ b/gofaster/app/dev-enhanced.ps1 @@ -1,4 +1,4 @@ -# 增强版开发脚本 - 解决中文编码和日志问题 +# 增强版开发脚本 - 解决中文编码和日志问题 param( [switch]$Debug, [switch]$Watch @@ -18,6 +18,14 @@ $env:LANG = "zh_CN.UTF-8" $env:LC_ALL = "zh_CN.UTF-8" $env:NODE_OPTIONS = "--max-old-space-size=4096" +# 设置Electron相关环境变量,改善DevTools兼容性 +$env:ELECTRON_DISABLE_SECURITY_WARNINGS = "true" +$env:ELECTRON_ENABLE_LOGGING = "false" +$env:ELECTRON_ENABLE_STACK_DUMPING = "false" +$env:ELECTRON_NO_ASAR = "1" +$env:ELECTRON_RUN_AS_NODE = "false" +$env:ELECTRON_NO_ATTACH_CONSOLE = "true" + # 显示启动信息 Write-Host "🚀 启动 GoFaster 前端开发环境..." -ForegroundColor Cyan Write-Host "📝 编码设置: UTF-8" -ForegroundColor Green diff --git a/gofaster/dev-full.ps1 b/gofaster/dev-full.ps1 index 66231a3..61d367e 100644 --- a/gofaster/dev-full.ps1 +++ b/gofaster/dev-full.ps1 @@ -1,4 +1,4 @@ -# GoFaster Full Stack Development Environment +# GoFaster Full Stack Development Environment param( [switch]$Debug, [switch]$Watch, @@ -7,15 +7,15 @@ param( ) # Set console encoding -[Console]::OutputEncoding = [System.Text.Encoding]::UTF-8 -$OutputEncoding = [System.Text.Encoding]::UTF-8 +[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 +$OutputEncoding = [System.Text.Encoding]::UTF8 # Set environment variables $env:VUE_CLI_BABEL_TRANSPILE_MODULES = "false" $env:VUE_CLI_MODERN_BUILD = "false" $env:VUE_CLI_LOG_LEVEL = "info" $env:VUE_CLI_DEBUG = "true" -$env:LANG = "zh_CN.UTF-8" +$env:LANG = "zh_CN.UTF-8" $env:LC_ALL = "zh_CN.UTF-8" $env:NODE_OPTIONS = "--max-old-space-size=4096" diff --git a/gofaster/start.ps1 b/gofaster/start.ps1 index 5781c34..af4bdd5 100644 --- a/gofaster/start.ps1 +++ b/gofaster/start.ps1 @@ -1,4 +1,4 @@ -# GoFaster 开发环境启动脚本 +# GoFaster 开发环境启动脚本 # 设置控制台编码为 UTF-8,解决中文显示乱码问题 [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 [Console]::InputEncoding = [System.Text.Encoding]::UTF8