Open aurelien-boubennec opened 2 months ago
Hi,
When I test this code in a React web app:
import { threaded } from "multithreading"; const getId = threaded(async function* () { const { v4 } = yield "uuid"; // Import other package return v4(); } console.log(await getId()); // 1a107623-3052-4f61-aca9-9d9388fb2d81
I get the following error:
TypeError: Failed to execute 'resolve' on 'import.meta': Failed to resolve module specifier uuid: Relative references must start with either "/", "./", or "../".
The uuid package is installed and I use Vite as the dev server.
I tried yield "./uuid" but it returns undefined.
yield "./uuid"
Any idea what path is expected? Thank you 🙏
Seems like the is the only way that works in my project: const { v4 } = yield "https://esm.sh/uuid"
const { v4 } = yield "https://esm.sh/uuid"
Though I tried const { _ } = yield "https://esm.sh/lodash"; but _ is returned as undefined.
const { _ } = yield "https://esm.sh/lodash";
Hi,
When I test this code in a React web app:
I get the following error:
The uuid package is installed and I use Vite as the dev server.
I tried
yield "./uuid"
but it returns undefined.Any idea what path is expected? Thank you 🙏