Open zivl opened 6 years ago
Check this out. You can run React component without iframe. https://github.com/yjiq150/react-chrome-extension-boilerplate
I just made a PR for the same problem today here. https://github.com/jhen0409/react-chrome-extension-boilerplate/pull/98
@yjiq150 can you explain here in a few words why/how did you walk-around it? why upgrading webpack solved this issue?
Actually it not related to webpack version. I bumped up the version while fixing inject problem.
To inject react component into the context of page, please refer here. I added some notes in there.
When I'm using inject mode I see there's a
iframe
that is responsible for loading thebundle.js
file. Why can't I import the<Root />
(or something similar...) and use it inside<Dock>
component?It adds a lot of headaches to use iframe for modules I have locally... all communication between the tabs and iframe need to go through
postMessage
and etc.Cheers,