fix(ui): 完善界面交互与开发配置
This commit is contained in:
@@ -24,6 +24,19 @@ import {
|
||||
projectViewports,
|
||||
} from './scripts/browser-environment.mjs';
|
||||
import { runtimeOptions } from './scripts/playwright-runtime.mjs';
|
||||
import { findDevService } from './scripts/dev-service.mjs';
|
||||
|
||||
if (
|
||||
!process.argv.includes('--list') &&
|
||||
!process.env.PW_TARGET &&
|
||||
!process.env.PW_BASE_URL
|
||||
) {
|
||||
const existing = await findDevService();
|
||||
if (existing) {
|
||||
process.env.PW_TARGET = 'remote';
|
||||
process.env.PW_BASE_URL = existing;
|
||||
}
|
||||
}
|
||||
|
||||
const runtime = runtimeOptions({ defaultPort: 4176, defaultWorkers: 1 });
|
||||
const { target, baseURL, isCI, headless, workers, outputDir, reportDir } =
|
||||
|
||||
Reference in New Issue
Block a user