iFaxity / vite-plugin-istanbul

A Vite plugin to instrument code for nyc/istanbul code coverage. In similar way as the Webpack Loader istanbul-instrumenter-loader. Only intended for use in development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vite crashes with vite-plugin-istanbul 2.6.1 release

yann-combarnous opened this issue ยท comments

Using build command in Vite crashes with latest release, logs:

failed to load config from /Users/xxx/Code/host-web/packages/app-web/vite.config.ts
error during build:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/xxx/Code/host-web/node_modules/vite-plugin-istanbul/node_modules/chalk/source/index.js from /Users/xxx/Code/host-web/node_modules/vite-plugin-istanbul/dist/index.js not supported.
Instead change the require of /Users/xxx/Code/host-web/node_modules/vite-plugin-istanbul/node_modules/chalk/source/index.js in /Users/xxx/Code/host-web/node_modules/vite-plugin-istanbul/dist/index.js to a dynamic import() which is available in all CommonJS modules.

Looks like the chalk upgrade in package.json is causing issues @iFaxity .

Hmm, yes i see.

I'll make a quick update by removing chalk in favor of picocolors.

A new version should be out now.

I've also deprecated the version 2.6.0 and 2.6.1on NPM as these versions are affected.

๐ŸŽ‰ This issue has been resolved in version 2.7.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€