Here's an example of what I'm trying to do:
../src/Foo/Bar.ts is a local typescript file
The code in the file is meant to run in a browser context (it accesses WebSockets), so I need to run it in page.evaluate
page.evaluate( async () => {
const { namedExportExample } = await import('../src/Foo/Bar;)
// ...
});
I get page.evaluate: TypeError: Failed to resolve module specifier and I'm not surprised, I'm not sure how the browser can evaluate that import, but I'd like to know if there's a way to do this if possible?