lxieyang / chrome-extension-boilerplate-react

A Chrome Extensions boilerplate using React 18 and Webpack 5.
MIT License
3.57k stars 1.1k forks source link

background.bundle.js is stale #128

Open woniesong92 opened 2 years ago

woniesong92 commented 2 years ago

background.bundle.js is stale even if you refresh the chrome extension.

Repro Steps:

  1. Write console.log('bg 1') in the file pages/Background/index.js
  2. Refresh the chrome extension in chrome://extensions
  3. Verify that bg 1 is printed in the background (service worker)'s console
  4. Update the code in pages/Background/index.js from console.log('bg 1') to console.log('bg 2')
  5. Refresh the chrome extension in chrome://extensions
  6. Notice that bg 1 is printed in the console when bg 2 is expected

Workaround: Remove the extension and load it again