Skip to content

Commit

Permalink
docs: add reference link for set debug environment variable on Windows (
Browse files Browse the repository at this point in the history
  • Loading branch information
btea committed Mar 5, 2024
1 parent 60dfa9e commit e92abe5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guide/api-hmr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e92abe5

Please sign in to comment.