Skip to content

Commit d9088ee

Browse files
less patch
1 parent a6c16c5 commit d9088ee

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/plugin-vite/src/plugins/patches.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export function patches(): Plugin {
1616
return true;
1717
},
1818
transform(code, id, options) {
19-
if (code.includes("__commonJS")) return;
19+
if (code.includes("__commonJS") || /\.(tsx?|m[jt]s)$/.test(id)) {
20+
return;
21+
}
2022

2123
const presets = [];
2224
if (!options?.ssr) {

0 commit comments

Comments
 (0)