Nevermind, I found out how to do it, hope this helps someone. just add this to the config file :

export default defineConfig({
plugins: [react()],
build: { //add this property
    sourcemap: true,
},
Answer from AlaaKudo810 on Stack Overflow
🌐
GitHub
github.com › facebook › react › issues › 30143
[DevTools Bug]: React Devtools not working neither on vite or cra project · Issue #30143 · facebook/react
June 30, 2024 - I was trying to use React Devtools but i was not able to use it as you can see it in pictures. I thought it was cause i was using vite to create my react project, but i didnt work either in cra app.
Author   prashantmgk
Discussions

I built a react project in vite and wanted to install react-devtools in the browser for debugging, but I got an error
Describe the bug I built a react project in vite and wanted to install react-devtools in the browser for debugging, but I got an error @react-refresh:492 Uncaught TypeError: Cannot read property &#... More on github.com
🌐 github.com
1
November 2, 2021
Setting up Devtools for Vite + React not working
Trying to set up Devtools following Publish Quickstart - Builder.io for Vite React but failed. Detailed steps to reproduce the bug Initialize a new Vite + React app with npm create vite@latest . -- --template react-ts Run npm init builder.io@latest Run npm run dev Navigate to http://localhost:5173 ... More on forum.builder.io
🌐 forum.builder.io
0
0
March 1, 2025
Newest 'react-devtools' Questions - Stack Overflow
I am working on an Electron application with React and Vite, and I have three main issues. Before I explain the problems, I will introduce the technologies I am using to clarify the issues and the ... ... What does the 5.8s for 24.2ms means? Found the source code react-devtools-shared/src/... More on stackoverflow.com
🌐 stackoverflow.com
reactjs - React query devtools not getting imported when using vite - Stack Overflow
[vite] Internal server error: Failed to resolve import "react-query/devtools" from "src/main.jsx". More on stackoverflow.com
🌐 stackoverflow.com
🌐
Zthxxx
react-dev-inspector.zthxxx.me › docs › integration › vite
Vite Plugin – React Dev Inspector
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { inspectorServer } from '@react-dev-inspector/vite-plugin' // https://vitejs.dev/config/ export default defineConfig({ ...
🌐
Vite
devtools.vite.dev
Vite DevTools
... Choose from iframe panels, custom renderers, or action buttons. Host your UI as embedded panels, browser extensions, or standalone webpages. ... Works with any framework built on Vite. Use Vue, React, Svelte, or any other framework to build your DevTools UI.
🌐
DEV Community
dev.to › nirtamir2 › using-vite-with-react-55go
Using Vite with React - DEV Community
May 10, 2021 - This may not be a concern for you because it looks like vite is planning to create its own jest preset to solve this problem. In our "old" build system - I configured webpack-bundle-analyze to inspect bundle chunks and understand what it made of. I added rollup-bundle-visualyzer instead (although there is an issue that the reported size is not correct). import reactRefresh from "@vitejs/plugin-react-refresh"; import bundleVisualizer from "rollup-plugin-visualizer"; import { defineConfig } from "vite"; import svgr from "vite-plugin-svgr"; import tsconfigPaths from "vite-tsconfig-paths"; functio
🌐
Vite
vite.dev › blog › announcing-vite8
Vite 8.0 is out! | Vite
2 weeks ago - Alongside Vite 8, we are releasing @vitejs/plugin-react v6. The plugin uses Oxc for React Refresh transform.
🌐
GitHub
github.com › vitejs › vite › issues › 5508
I built a react project in vite and wanted to install react-devtools in the browser for debugging, but I got an error · Issue #5508 · vitejs/vite
November 2, 2021 - Describe the bug I built a react project in vite and wanted to install react-devtools in the browser for debugging, but I got an error @react-refresh:492 Uncaught TypeError: Cannot read property 'forEach' of undefined at Object.injectInt...
Author   LBJDJW
Find elsewhere
🌐
Builder.io
forum.builder.io › bugs
Setting up Devtools for Vite + React not working - Bugs - Builder.io Forum
March 1, 2025 - Detailed steps to reproduce the bug Initialize a new Vite + React app with npm create vite@latest . -- --template react-ts Run npm init builder.io@latest Run npm run dev Navigate to http://localhost:5173 ...
🌐
React
react.dev › learn › react-developer-tools
React Developer Tools – React
To inspect apps built with React Native, you can use React Native DevTools, the built-in debugger that deeply integrates React Developer Tools.
🌐
Vite
devtools.vite.dev › kit › devtools-plugin.html
DevTools Plugin | Vite DevTools
const plugin: Plugin = { devtools: { setup(ctx) { // Access Vite configuration console.log('Root:', ctx.viteConfig.root) console.log('Mode:', ctx.mode) // Check if we're in dev mode if (ctx.viteServer) { console.log('Dev server is running') } } } } If you have a pre-built UI (e.g., a Vue/React SPA), use ctx.views.hostStatic() to serve it: ts ·
🌐
GitHub
github.com › jacksteamdev › crx-react-devtools
GitHub - jacksteamdev/crx-react-devtools
// vite.config.ts const manifest = defineManifest({ manifest_version: 3, name: "CRX devtools extension", version, content_scripts: [ { js: ["src/content-script.ts"], matches: ["<all_urls>"], run_at: "document_start", }, ], devtools_page: "src/devtools.html", });
Starred by 21 users
Forked by 3 users
Languages   TypeScript 65.7% | CSS 20.4% | HTML 13.9% | TypeScript 65.7% | CSS 20.4% | HTML 13.9%
🌐
GitHub
github.com › Toumash › crxjs-vite-plugin-react-devtools
GitHub - Toumash/crxjs-vite-plugin-react-devtools: My researched CRXJS with Vite 4 and React with working react-devtools
This repo shows how to currently run react-devtools for the best IMHO vite react extension toolchain - crxjs/chrome-extension-tools.
Author   Toumash
🌐
Vite
vite.dev › guide
Getting Started | Vite
See create-vite for more details on each supported template: vanilla, vanilla-ts, vue, vue-ts, react, react-ts, react-swc, react-swc-ts, preact, preact-ts, lit, lit-ts, svelte, svelte-ts, solid, solid-ts, qwik, qwik-ts.
🌐
GitHub
github.com › 729993031 › react-devtools-vite
GitHub - 729993031/react-devtools-vite
November 1, 2021 - Contribute to 729993031/react-devtools-vite development by creating an account on GitHub.
Author   729993031
🌐
Stack Overflow
stackoverflow.com › questions › tagged › react-devtools
Newest 'react-devtools' Questions - Stack Overflow
I am working on an Electron application with React and Vite, and I have three main issues. Before I explain the problems, I will introduce the technologies I am using to clarify the issues and the ... ... What does the 5.8s for 24.2ms means? Found the source code react-devtools-shared/src/devtools/views/Profiler/SidebarSelectedFiberInfo.js#L97 const listItems = []; let i = 0; for (i = 0; i < ...
🌐
React
react.dev › learn › react-compiler › installation
Installation – React
Install vite-plugin-babel, and add the compiler’s Babel plugin to it:
🌐
Stack Overflow
stackoverflow.com › questions › 73357772 › react-query-devtools-not-getting-imported-when-using-vite
reactjs - React query devtools not getting imported when using vite - Stack Overflow
I am trying react-query with react with vite as my bundling tool. When I try to import the ReactQueryDevtools from 'react-query' - I get the following build time error: [vite] Internal server error:
🌐
npm
npmjs.com › package › react-devtools
react-devtools - npm
The React tab won't show up if the site doesn't use React, or if React can't communicate with the devtools. When the page loads, the devtools sets a global named __REACT_DEVTOOLS_GLOBAL_HOOK__, then React communicates with that hook during initialization.
      » npm install react-devtools
    
Published   Oct 20, 2025
Version   7.0.1
🌐
Reddit
reddit.com › r/reactjs › react devtools for debugging chrome extension?
r/reactjs on Reddit: React Devtools for debugging Chrome extension?
October 15, 2025 - I also tried installing react-devtools npm package and injecting script in my file where I render html (basically root.render()) but that doesn't work either. Apparently its cuz of manifest v3 rules or something. Can anyone guide me how to use react-devtools for debugging chrome extension? Tech stack is React 19, Typescript 5.9, Vite 7 with Crxjs, Node 24(npm).