Closed MwirabuaTimothy closed 4 years ago
I realize that extension scripts usually have global variables that must invoke inside a chrome extension like chrome.storage etc but im hoping we can figure out a workaround. Perhaps proxy some of these global calls to the installed extension?
Ive put together this minimal starter kit for quick testing of this idea https://github.com/MwirabuaTim/react-chrome-extension
I just separated the UI from the content script on this kit too. You can now see the error thrown by the webext-redux proxy store https://github.com/MwirabuaTim/react-chrome-extension
Uncaught TypeError: Cannot read property 'addListener' of undefined at Store.js:108
this.safetyMessage = this.browserAPI.runtime.onMessage.addListener(this.safetyHandler);
I just realized that once you install the extension, all the necessary pages are already visible on:
chrome-extension://YOUR-EXTENSION-ID/content.html chrome-extension://YOUR-EXTENSION-ID/popup.html chrome-extension://YOUR-EXTENSION-ID/options.html
And once you have my webpack-dev-server running, with writeToDisk set to true, you can refresh any of these links to see the updates.
My current development process (using this toolkit) involves the following
This is quite tiring and slow so...