chrome-extension-boilerplate-react icon indicating copy to clipboard operation
chrome-extension-boilerplate-react copied to clipboard

Please consider introducing react fast refresh

Open XuNeal opened this issue 3 years ago • 4 comments

This boilerplate is great. Thanks for the work.

Please consider introducing react fast refresh. React Fast Refresh will speed up the react development.

XuNeal avatar Apr 10 '21 01:04 XuNeal

I second this. Would it be difficult to do this? I'm asking as I'd like to try and implement it myself.

johnAirRobe avatar Apr 09 '22 06:04 johnAirRobe

@XuNeal and whoever else is interested. I was able to add React Fast Refresh. I followed the Prerequisites, Installation, and Usage sections of the readme.

Then I removed the use of alias from webpack.config.js and add react-refresh/babel to .babelrc.

Here's a gist of the changes I made.

When I ran the local server I got the following screen and was able to navigate to the newtab, options, panel, and popup pages. image

johnAirRobe avatar Apr 10 '22 05:04 johnAirRobe

Additional changes:

hot: true,
liveReload: false

utils/webserver.js to make it work.

devnomic avatar Apr 14 '22 01:04 devnomic

I created a repo by create-react-app, so you can enjoy it. cra-crx-boilerplate

Godiswill avatar May 20 '22 04:05 Godiswill

Done!

lxieyang avatar Jan 15 '23 03:01 lxieyang