Chrome 扩展程序 - 无法导入剧作家

Chrome Extension - Unable to import playwright

提问人:Nihir Agarwal 提问时间:8/11/2023 更新时间:8/11/2023 访问量:47

问:

我正在使用 plasmo 开发一个 chrome 扩展程序来自动化网页交互。我想使用剧作家进行所有与 DOM 相关的交互。但是我无法进口铬。我认为这是因为有些包不能在 V8 chrome 引擎中使用,但可用于正常的 Node js 执行运行时。

const minimumMajorNodeVersion = 14;
const currentNodeVersion = process.versions.node;
const semver = currentNodeVersion.split("."); <- this is the line which throws error saying currentNodeVersion is undefined.

你能帮我如何将剧作家导入到有或没有等离子体的 chrome 扩展程序中吗?

node.js google-chrome-extension chromium 剧作家

评论

1赞 wOxxOm 8/11/2023
playwright运行浏览器,但它不会在浏览器运行。

答: 暂无答案