Skip to content

Commit

Permalink
fix: make puppeteer external in web-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyutaotao committed Dec 25, 2024
1 parent 05dad23 commit a7ab239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/web-integration/modern.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export default defineConfig({
yaml: 'src/yaml/index.ts',
},
target: 'es2018',
externals: ['@midscene/core', '@midscene/shared'],
externals: ['@midscene/core', '@midscene/shared', 'puppeteer'],
},
});
2 changes: 1 addition & 1 deletion packages/web-integration/src/puppeteer/agent-launcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import assert from 'node:assert';
import { readFileSync } from 'node:fs';
import puppeteer from 'puppeteer';

import { PuppeteerAgent } from '@/puppeteer';
import type { MidsceneYamlScriptEnv } from '@midscene/core';
Expand Down Expand Up @@ -72,6 +71,7 @@ export async function puppeteerAgentForTarget(
'you are probably running headed mode in CI, this will usually fail.',
);
}
const puppeteer = await import('puppeteer');
const browser = await puppeteer.launch({
headless: !headed,
args: [
Expand Down

0 comments on commit a7ab239

Please sign in to comment.