-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning is shown: The CJS build of Vite's Node API is deprecated #209
Labels
Comments
aimad-majdou
changed the title
Issue with Deprecated CJS Node API Usage
Warning is shown: The CJS build of Vite's Node API is deprecated
Apr 19, 2024
Hi @aimad-majdou, thanks for the issue. Absolutely, will look into this and upload a new major version to export using ES modules instead. |
iFaxity
added a commit
that referenced
this issue
May 4, 2024
iFaxity
added a commit
that referenced
this issue
May 4, 2024
* fix: moved to esm modules for vite 5 Fixes #209. * build: updated to node v20.12.2 * build: switched to pnpm v9 * chore(deps): update dependencies
🎉 This issue has been resolved in version 6.0.1-rc.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 6.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Upon migrating to Vite version 5, it has been discovered that the vite-plugin-istanbul package is generating a warning due to its usage of the deprecated CJS Node API. The warning originates from the node_modules/vite-plugin-istanbul/dist/index.cjs file:
Proposed Solution:
Update the import statement in vite-plugin-istanbul to use dynamic imports, as recommended in the Vite documentation here.
For additional infos please check this issue: storybookjs/storybook#26291
Reproduction
https://stackblitz.com/edit/github-wgldvd-tuuoti
Steps to reproduce
Open the reproduction url, and observe the warning message related to the deprecated CJS Node API usage, in the console after the project starts.
If you remove the
'@storybook/addon-coverage'
frommain.ts
the error will disappear.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: