fix(vite): npm resolution + cjs + duplicated preact signals (#3211)

This commit is contained in:
Marvin Hagemeister
2025-08-16 19:26:39 +02:00
committed by GitHub
parent 71071171ed
commit 59549c9532
18 changed files with 1047 additions and 466 deletions
@@ -0,0 +1,19 @@
import type { types } from "@babel/core";
export function jsxComments(): babel.PluginObj {
return {
name: "fresh-jsx-comment",
visitor: {
Program(path) {
const comments = (path.parent as types.File).comments;
if (comments) {
for (let i = 0; i < comments.length; i++) {
const comment = comments[i];
comment.value = comment.value.replaceAll(/@jsx\w+\s+[^\s*]+/g, "");
}
}
},
},
};
}