Summary
I'm currently using vite-plugin-node-polyfills version 0.17.
After installing the plugin and enabling the process polyfill, most of the expected polyfills were successfully added — however, process.hrtime is missing.
I also tested this with the latest version (0.23), and the issue still persists.
Steps to Reproduce
-
Install vite-plugin-node-polyfills (v0.17 or v0.23)
-
Enable process polyfill
plugins: [
nodePolyfills({
include: ["process"],
}),
]
- Use
process.hrtime in App
console.log("process:", process, process?.hrtime);
Observe that process.hrtime is undefined
Expected Behavior
process.hrtime should be polyfilled along with other process properties.
Environment
- Vite version:
5.4.14
- Node version:
22
vite-plugin-node-polyfills version: 0.17 / 0.23
- Browser:
Chrome
Summary
I'm currently using vite-plugin-node-polyfills version 0.17.
After installing the plugin and enabling the process polyfill, most of the expected polyfills were successfully added — however, process.hrtime is missing.
I also tested this with the latest version (0.23), and the issue still persists.
Steps to Reproduce
Install vite-plugin-node-polyfills (v0.17 or v0.23)
Enable process polyfill
process.hrtimein AppObserve that
process.hrtimeisundefinedExpected Behavior
process.hrtime should be polyfilled along with other process properties.
Environment
5.4.1422vite-plugin-node-polyfillsversion: 0.17 / 0.23Chrome