Describe the bug
When using vite-plugin-istanbul with minimatch v3.x, the plugin throws an error:
Internal server error: minimatch is not a function
This is caused by test-exclude importing minimatch as { minimatch } = require('minimatch'), but minimatch v3 exports the function directly. The error occurs at test-exclude/index.js:98 when calling minimatch(...).
Reproduction
Vite should start without errors and code coverage should work
Steps to reproduce
Install vite-plugin-istanbul and minimatch@3.x.
Start Vite.
Observe the error in the console.
System Info
Used Package Manager
yarn
Logs
Update the import in test-exclude to:
const minimatch = require('minimatch');
Or ensure compatibility with minimatch v3.x
Validations
Describe the bug
When using vite-plugin-istanbul with minimatch v3.x, the plugin throws an error:
Internal server error: minimatch is not a function
This is caused by test-exclude importing minimatch as { minimatch } = require('minimatch'), but minimatch v3 exports the function directly. The error occurs at test-exclude/index.js:98 when calling minimatch(...).
Reproduction
Vite should start without errors and code coverage should work
Steps to reproduce
Install vite-plugin-istanbul and minimatch@3.x.
Start Vite.
Observe the error in the console.
System Info
Used Package Manager
yarn
Logs
Update the import in test-exclude to:
const minimatch = require('minimatch');
Or ensure compatibility with minimatch v3.x
Validations