Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yjiq150
Copy link

@yjiq150 yjiq150 commented Jul 15, 2018

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?

  • Updated: Webpack 4, React 16 (lint & test utility are updated as well)

  • Updated: separated entry points for window, popup, background, content, and page script.

  • Updated: Script for development has been separated to dev-r and dev-s.

  • Updated: Using standard webpack-dev-server instead of httpolyglot-server.

  • Added: react-intl (localization support)

  • Added: sass support

  • Added: localization structure of Chrome Extension Package

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.

- Added: react-intl (localization) + sass support
- Structure fix: separated entry points for window, popup, background, content, and page script.
- Dev Environment: Use webpack-dev-server instead of httpolyglot-server
@yjiq150 yjiq150 changed the title Updating outdated library + Supporting page inject app without iframe. Updating outdated library + Supporting page InjectApp without CSP problem. Jul 15, 2018
@jhen0409
Copy link
Owner

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

@razum2um
Copy link

Awesome, @jhen0409 will you merge it eventually?

@shirshak55
Copy link

shirshak55 commented Jan 6, 2019

@jhen0409 any chance to merge?

@mfcastro
Copy link

mfcastro commented Mar 2, 2019

any updates on this?

@frontr-uk
Copy link

are you still support HR module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants