lxieyang / chrome-extension-boilerplate-react

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

Update to React 18 #129

Closed jhserodio closed 1 year ago

jhserodio commented 2 years ago

React 18

issue 120

sbahir commented 2 years ago

@jhserodio I tested your changes and it seems like I cannot set anymore breakpoints to debug the unbundled reactJS file from VScode.

It works perfectly on the latest stable version. Do you have this same issue? If so, do you know what could have broken it?

It's quite painful to try to debug the bundled reactjs files with your changes

sbahir commented 2 years ago

@lxieyang please refer to my previous comment before merging this. Maybe I am wrong ...

sbahir commented 2 years ago

@jhserodio @lxieyang

You need to make a change in webpack.config.js to fix webpack source mapping

if (env.NODE_ENV === 'development') {
  // options.devtool = 'cheap-module-source-map';
  options.devtool = 'inline-cheap-module-source-map';
}

Otherwise, we can't link react source files in DevTools sources

Please let me know if you have any questions or feedback

veeramarni commented 1 year ago

@sbahir any fix for breakpoint issue?

lxieyang commented 1 year ago

Done!