Dashboardopencode-loreembedding-worker CJS ESM location

embedding-worker CJS ESM location

Category: preference
Confidence: 1.00
ID: 01a0a610-2301-7b63-a1e6-30531959604d
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 14qjeFAXJ9DyU5IlY
Created: 2026-09-15 12:00:24
Updated: 2026-09-15 17:14:30

Content

Resolve local embedding-worker entrypoints according to module system: use __filename in CommonJS and import.meta.url in ESM. Preserve the source/build shim that keeps the CommonJS branch valid; a unified mechanism fails because import.meta.url needs a CJS shim while __filename is unavailable in native ESM. Handle development .ts execution under tools such as Vitest or tsx separately from production worker sources.

Move to: