jhen0409 / react-chrome-extension-boilerplate

Boilerplate for Chrome Extension React.js project
MIT License
2.14k stars 388 forks source link

Change injectpage to localhost page & GitHub page #19

Closed jhen0409 closed 8 years ago

jhen0409 commented 8 years ago

The original injectpage is detect visiting GitHub and start, it will cause some problems, so I have plan to move it to the localhost and GitHub page.

I has three reasons: 1. The injectpage include redux-devtools, it will affect developers read on GitHub. 2. The webpack-dev-server will no longer use https. 3. The injectpage E2E test run on localhost of CI build, everything will work well.

tommedema commented 8 years ago

I've changed the injectpage to use http on my fork, but this causes issues when you try to inject on all URLs, no matter the protocol.

I think the best solution is to run webpack-dev-server on HTTP, and then have a HTTPS proxy (SSL termination), such that both protocols work.

jhen0409 commented 8 years ago

@tommedema I tried using httpolyglot and webpack-dev(hot)-middleware to create server, it works very well. Maybe I'll release it today.

tommedema commented 8 years ago

@jhen0409 would be great if you could; I spend another 4 hours on it today and I cannot get it all to work. Sometimes HTTP works, sometimes HTTPS, sometimes both, but then not WSS (but only WS, or the other way around).

tommedema commented 8 years ago

@jhen0409 does it also work for websockets?

tommedema commented 8 years ago

@jhen0409 any news on this?

jhen0409 commented 8 years ago

@tommedema, I created webpack-httpolyglot-server and created this branch for that, you can try first.

Also, the webpack-hot-middleware isn't use Websockets, it just use Server Sent Events.

jhen0409 commented 8 years ago

Finally we use webpack-httpolyglot-server #37, so this issue will not do.