[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Related plugins
[X] plugin-vue
[ ] plugin-vue-jsx
Describe the bug
vite : const Buffer = require('safe-buffer').Buffer; console.log(Buffer); //undefined webpack or node: const Buffer = require('safe-buffer').Buffer; console.log(Buffer); // Buffer why?
Reproduction
https://vitejsvite8tnkvo-bed1--5173--810981ba.local-credentialless.webcontainer.io/
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations