Closed jswhisperer closed 1 month ago
Working in embedded webviews it's difficult to get events as they are overwritten (in my case) I would be nice to have an alternative to server-ready event
webcontainerInstance.on("server-ready", (port: any, url: string) => { webc.value = url; });
If it was on the instance somewhere rather just await npm start should be sufficent to know the server is running.
await webcontainerInstance .spawn("npm", ["run", "start"]) .then((deets) => { webc.value = "http://localhost:3111"; // or deets.url ? }) .catch((e: any) => console.log(e));
or webcontainerInstance.url
Working in embedded webviews it's difficult to get events as they are overwritten (in my case) I would be nice to have an alternative to server-ready event
If it was on the instance somewhere rather just await npm start should be sufficent to know the server is running.
or webcontainerInstance.url