jhen0409 / react-chrome-extension-boilerplate

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

Readme: unclear how to run in development #16

Closed jforaker closed 6 years ago

jforaker commented 8 years ago

Please provide more information on how to run the project in development:

[13:42:14] Please allow `https://localhost:3000` connections in Google Chrome

[13:42:14] and load unpacked extensions with ./dev

In particular, what does "load unpacked extensions with ./dev" mean?

How to run it without running the whole npm run compress and manually installing it via dragging it to chrome://extensions/?

jhen0409 commented 8 years ago

Refer: https://github.com/jhen0409/react-chrome-extension-boilerplate#development

  1. The injectpageis need https protocol on development mode, but we not have SSL certificate.
  2. It discussed in the (https://github.com/zalmoxisus/browser-redux/issues/5). (Maybe we can change to that solution)

Also, this getstarted can help you, I'll add link to readme and log.

zalmoxisus commented 8 years ago

The con of that solution is that you'll still get warnings in the console, which could be annoying. I tried to make Webpack to work on both https and http. The idea was to use automatically the protocol corresponding to the injected page, but didn't figure how to get hmr to work on both protocols.

kenyeung128 commented 8 years ago

Hi, you could get the warning removed by this new flag in chrome.

  1. go to the url: chrome://flags/#allow-insecure-localhost
  2. click "enable" and restart chrome.
brandonmp commented 8 years ago

Extension works great & injects components just fine, but having some trouble getting hot reloading to work here. I've set the flag as @kenyeung128 suggested, and my address bar doesn't show any https issues, but getting errors described below. Welcoming any ideas--I don't need hot reloading, but the console spam is a pain.

  1. https://localhost refuses connection, and https://localhost:3000 "unexpectedly closed connection," so neither will load
  2. There's a non-stop spam every few seconds in console of:
abstract-xhr.js:132 GET https://localhost:3000/sockjs-node/info?t=1473981718281 net::ERR_CONNECTION_CLOSEDAbstractXHRObject._start @ abstract-xhr.js:132(anonymous function) @ abstract-xhr.js:21
client:101 [WDS] Disconnected!sock.onclose @ client:101EventTarget.dispatchEvent @ eventtarget.js:51(anonymous function) @ main.js:356
abstract-xhr.js:132 GET https://localhost:3000/sockjs-node/info?t=1473981720295 net::ERR_CONNECTION_CLOSEDAbstractXHRObject._start @ abstract-xhr.js:132(anonymous function) @ abstract-xhr.js:21

here's a screenie: image