lxieyang / chrome-extension-boilerplate-react

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

Content file does not execute #176

Open hg2990656 opened 1 year ago

hg2990656 commented 1 year ago

I clone the latest project and run the code and add it to chrome extension, but it didn't print the log in index.js of Content.

tibic commented 1 year ago

i have the same problem

KirillSuhodolov commented 1 year ago

the same

nzayatz14 commented 1 year ago

I also, and Im getting errors when loading the dev pages

Screenshot 2023-06-20 at 1 38 00 PM
aldrinjenson commented 1 year ago

same issue. how to fix this?

mszajner commented 1 year ago

The problem is that the background and content scripts have hot-reload enabled. This causes them to want to connect to the server (which has a different origin and/or protocol). The way around it is to build a plugin to the build directory and manually update it in the browser from there. For example, the workaround is just to remove ZipPlugin from utils/build (or make a copy), then run: npm run build and reload manually plugin in Chrome browser from build directory.

minarainbow commented 1 year ago

Was there a good fix for this?

iqbalexperience commented 1 year ago

Will there be any development on this issue in future?

jasekt commented 11 months ago

Solved in issue #150