diff --git a/docs/guide/api-hmr.md b/docs/guide/api-hmr.md index a24fe277fbfe24..e0cd9485527e1c 100644 --- a/docs/guide/api-hmr.md +++ b/docs/guide/api-hmr.md @@ -197,7 +197,7 @@ Custom HMR events can also be sent from plugins. See [handleHotUpdate](./api-plu ## `hot.off(event, cb)` -Remove callback from the event listeners +Remove callback from the event listeners. ## `hot.send(event, data)` diff --git a/docs/guide/performance.md b/docs/guide/performance.md index 2d56ca2e389f63..0c56f5eae18937 100644 --- a/docs/guide/performance.md +++ b/docs/guide/performance.md @@ -26,7 +26,7 @@ However, the performance of community plugins is out of Vite's control, which ma The longer it takes to transform a file, the more significant the request waterfall will be when loading the site in the browser. - You can inspect the duration it takes to transform a file using `DEBUG="vite:plugin-transform" vite` or [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect). Note that as asynchronous operations tend to provide inaccurate timings, you should treat the numbers as a rough estimate, but it should still reveal the more expensive operations. + You can inspect the duration it takes to transform a file using `DEBUG="vite:plugin-transform" vite` or [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect). Note that as asynchronous operations tend to provide inaccurate timings, you should treat the numbers as a rough estimate, but it should still reveal the more expensive operations. For setting environment variables on Windows platform, please refer to the [documentation](https://github.com/debug-js/debug?tab=readme-ov-file#windows-command-prompt-notes). ::: tip Profiling You can run `vite --profile`, visit the site, and press `p + enter` in your terminal to record a `.cpuprofile`. A tool like [speedscope](https://www.speedscope.app) can then be used to inspect the profile and identify the bottlenecks. You can also [share the profiles](https://chat.vitejs.dev) with the Vite team to help us identify performance issues.