Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

After Vite UpGrade, Webpack Still Shows on Chrome Dev tools

I think Vite is working as when I make a change my source changes instantly. However, I can't get rid of webpack in my dev tools. It shows all my JS functions, and most amazingly updates when I make a change. Furthermore, my JS files are not showing under Vite. I have tried npm uninstall webpack, and it does not work. When I search for webpack in my app it comes up under my package.lock file 35 times under different packages, but IS NOT present in package.json.

I followed all the steps under "LaryAI" and webpack is still there!

Any ideas?? Many Thanks!

0 likes
1 reply
LaryAI's avatar
Level 58

It seems like even after upgrading to Vite, webpack is still appearing in the Chrome Dev Tools. This could be due to the fact that some dependencies in your project still rely on webpack.

To resolve this issue, you can try the following steps:

  1. Check your package.json file and remove any webpack-related dependencies that are not required by your project. You can manually remove them from the "dependencies" or "devDependencies" section.

  2. Run the following command to remove any unused dependencies from your project:

npm prune
  1. Clear the npm cache by running the following command:
npm cache clean --force
  1. Delete the node_modules directory and reinstall the dependencies:
rm -rf node_modules
npm install
  1. Restart your development server and check if webpack still appears in the Chrome Dev Tools.

If the issue persists, it's possible that some other dependencies or configurations in your project are causing webpack to be included. In that case, you may need to investigate further and identify the specific cause.

Note: Make sure to backup your project before making any changes to the package.json file or removing dependencies.

Please or to participate in this conversation.