Is there a way to launch a separate devtools after a build? #595
Replies: 1 comment
|
Yes, you can already do this without the app running. Two things tripped me up when I tried it with Vite 8.3 and @vitejs/devtools 0.7.6:
// vite.config.js
export default defineConfig({
build: { rolldownOptions: { devtools: {} } },
})Then: npm i -D @vitejs/devtools-rolldown
vite build
npx vite-devtools # serves DevTools on :9999 from the saved build data
npx vite-devtools build # static output in .vite-devtools/The standalone server worked for me with no dev server or app running, including the chunks treemap data (add One caveat: Source for where the data is read: https://github.com/vitejs/devtools/blob/main/packages/rolldown/src/node/rpc/utils.ts Do you need the report to be a static artifact you can host, or is running |
Uh oh!
There was an error while loading. Please reload this page.
We'd like to move away from 3rd party bundle visualisation (tree-map view in particular, like Sonda) and use Vite Devtools. It seems like devtools is currently only possible while the app is running.
Are there plans to enable something that can be run independently of a server/application for post-build analysis?
All reactions