jhen0409 / react-chrome-extension-boilerplate

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

Updating outdated library + Supporting page InjectApp without CSP problem. #98

Open yjiq150 opened 6 years ago

yjiq150 commented 6 years ago

Hi,

I updated major libraries and development environment to avoid CSP (Content Security Policy) problem in InjectApp.

This is kind of major update and lots of things been modified so I'm not sure you will like this updates. However, I made this pull request for people that might have run into the same problems as me and need newer version of Webpack and React.

What's changed?

Details on CSP problem

When I develop my Steemit Enhancer Chrome Extension, I run into many problems related to CSP with InjectApp part of your original boilerplate code. I need to inject script into currently opened page's context, but the page itself has its own CSP and http://localhost:3000 is not allowed due to CSP.

Therefore I separated dev script into two pieces (dev-r & dev-s) to avoid CSP restriction. Developers can use dev-r to develop background, window, and popup script which don't need to worry about CSP. If developers want to develop content script and injected page script, which can run into CSP restriction, they can use dev-s.

jhen0409 commented 6 years ago

It's awesome! I'll back to do more review next few days.

razum2um commented 5 years ago

Awesome, @jhen0409 will you merge it eventually?

shirshak55 commented 5 years ago

@jhen0409 any chance to merge?

mfcastro commented 5 years ago

any updates on this?

frontr-uk commented 5 years ago

are you still support HR module?