mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-07-26 16:42:27 +08:00
fix: require is not defined (#334)
Since it's moved to ESM, `require` isn't defined. This hotfix is just recreating `require` to workaround this issue.
This commit is contained in:
parent
43aa4001b5
commit
49979641fa
@ -20,6 +20,9 @@ import path from 'path';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import { defineTool } from './tool.js';
|
import { defineTool } from './tool.js';
|
||||||
|
|
||||||
|
import { createRequire } from 'node:module';
|
||||||
|
const require = createRequire(import.meta.url);
|
||||||
|
|
||||||
const install = defineTool({
|
const install = defineTool({
|
||||||
capability: 'install',
|
capability: 'install',
|
||||||
schema: {
|
schema: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user