Skip to content

Commit b8c6f9f

Browse files
committed
fix: add empty transform to vite scan plugin for Vite 7.0+ compatibility
Fixes #19376 - Cannot read properties of undefined (reading 'call') - Added empty transform() function to @tailwindcss/vite:scan plugin - Returns null to tell Vite to skip transformation for this plugin - Prevents undefined error when Vite 7.0+ tries to call plugin.transform.call() - Maintains backward compatibility with older Vite versions
1 parent 9e436f7 commit b8c6f9f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/@tailwindcss-vite/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ export default function tailwindcss(opts: PluginOptions = {}): Plugin[] {
114114
minify = opts.optimize.minify !== false
115115
}
116116
},
117+
118+
// Add empty transform to prevent Vite 7.0+ from trying to call undefined transform
119+
transform() {
120+
return null
121+
},
117122
},
118123

119124
{

0 commit comments

Comments
 (0)