GoogleChromeLabs / critters

🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.
https://npm.im/critters-webpack-plugin
Apache License 2.0
3.44k stars 108 forks source link

refactor: replace `process.hrtime` with `Date.now` #176

Closed alan-agius4 closed 1 month ago

alan-agius4 commented 1 month ago

Switched from process.hrtime to Date.now as high-resolution timing is not required in this case. This change removes the dependency on Node.js-specific functionality, enabling the library to run in environments like Cloudflare Workers using unenv with Angular.

//cc @kara