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

Reason to eject: I wanted better dev experience in my chrome extension #310

Closed
kasperpeulen opened this issue Jul 31, 2016 · 2 comments
Closed

Comments

@kasperpeulen
Copy link
Contributor

kasperpeulen commented Jul 31, 2016

So I heard you guys appreciated to hear reasons to eject. For me it was that I wanted a better dev experience in my chrome extension development.

So I make some chrome extension content script. First I used this project like this: I changed index.html to kind of mimic the final real webpage I make the content script for. I did most of the development in this index.html playground, and then when I needed to really test it on the actual web page, I would build it, and then load the build directory as chrome extension.

But now, I got a bit further in development, and I need to test as a real chrome extension all the time. So the setup from create-react-app, doesn't work anymore. It is actually not that trivial to get any css hot reloading working with a chrome extension, or even just automatic refresh of the page after a change.

I ejected and I found this project:
https://github.com/schovi/webpack-chrome-extension

I copied changes from that project to the ejected boilerplate. And it all works now how I want it:
https://github.com/kasperpeulen/chrome-extension-template

Basically the changes are,

  1. added a ManifestPlugin in config/webpack.config.dev.js (and the source of that plugin, as the project from @schovi doesn't seem to be on npm).
  2. loaded a overrideHotUpdater function, before the dev server starts in scripts/start.js. This function is also from @schovi and the source is included in the repo.
@gaearon
Copy link
Contributor

gaearon commented Jul 31, 2016

Thanks for the feedback!

@gaearon gaearon closed this as completed Jul 31, 2016
@schovi
Copy link

schovi commented Aug 2, 2016

@kasperpeulen Hi. It is funny, because I am currently working parallely on exactly same thing as create-react-app I made branch for that https://github.com/schovi/webpack-chrome-extension/tree/feature/standalone (check commits) But thanks to this project I want to rewrite whole thing to be more like it, because it is awesome! :) And it is not on npm, because I cant find good name for that.

@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants