diff --git a/tsup.config.ts b/tsup.config.ts index d77aa977..a2ef9131 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -23,5 +23,5 @@ export default defineConfig({ function addMjsExtension(content) { // This regex looks for relative import paths that don't have a file extension - return content.replace(/from\s+['"](\.\/|\.\.\/)(?![^'"\s]+?\.\w+['"])([^'"\s]+?)['"];/g, "from '$1$2.mjs';"); + return content.replace(/from\s+['"](\.\/|\.\.\/)(?![^'"\s]+?\/)['"]([^'"\s]+?)['"];/g, "from '$1$2.mjs';"); }