ElMassimo / ElMassimo/vite-plugin-full-reload
Vite 5 warning - The CJS build of Vite's Node API is deprecated
- Dominant language
- TypeScript
- Stars
- 176
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I get the following warning on vite 5 which traces back to this plugin, see trace below. The warning references https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
```
Trace: The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
at warnCjsUsage (/Users/tvongaza/aeon/aeonv2/node_modules/vite/index.cjs:32:3)
at Object. (/Users/tvongaza/aeon/aeonv2/node_modules/vite/index.cjs:3:1)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at _require.extensions. [as .js] (file:///Users/tvongaza/aeon/aeonv2/node_modules/vitest/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:66343:17)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object. (/Users/tvongaza/aeon/aeonv2/node_modules/vite-plugin-full-reload/dist/index.cjs:5:13)
```
Contributor guide
Research direction
Start with the Vite troubleshooting link and the stack trace, especially vite-plugin-full-reload/dist/index.cjs where the plugin is loaded. Reproduce the warning with Vite 5 and verify that the plugin no longer triggers the deprecated CJS Node API warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100