-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Is there anyone who can help integrate vite-plugin-electron with Playwright?
By default, vite-plugin-electron uses ES modules, and directly installing Playwright leads to the following error:
await playwright.chromium.launch()
App threw an error during load
ReferenceError: __dirname is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/mike/Documents/git/national-library-robot/package.json' contains "type": "module".
To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
What can I do?
Metadata
Metadata
Assignees
Labels
No labels