tshaddix / webext-redux

A set of utilities for building Redux applications in Web Extensions.
MIT License
1.22k stars 180 forks source link

usage with create-react-app without ejecting #222

Closed abhijithvijayan closed 4 years ago

abhijithvijayan commented 5 years ago

Is it possible to use this package with CRA without breaking anything?

I have set up CRA with redux & react-redux like a regular webapp, and CRA's default endpoint will be an index.js

Is there any example you can point out to?

abhijithvijayan commented 5 years ago

I use create-react-app with custom config(without ejecting) to provide code sharing from the next.js app

VasilyShelkov commented 5 years ago

Hey I'm maintaining a fork of CRA which specifically allows the development of browser extensions https://github.com/VasilyShelkov/create-react-extension

bartekus commented 4 years ago

You can also just patch your normal CRA and use webpack-extension-reloader. Here is an example: cra-modular-redux-auth0-saga-browser-extension and a quick write-up about how to do it.

abhijithvijayan commented 4 years ago

Hey, I made my own(quite popular) starter https://github.com/abhijithvijayan/web-extension-starter

bartekus commented 4 years ago

That's pretty cool, however I do not want to eject.

abhijithvijayan commented 4 years ago

@bartekus This is not a CRA app

bartekus commented 4 years ago

@abhijithvijayan I see we're after different things then, my intent is to simply use CRA for building browser extensions. To each their own I guess.

abhijithvijayan commented 4 years ago

I wanted that initially just to use React in the front-end.

On trying that out, I found out it was better to set up custom webpack config with autoreloading and browser tailored manifest generation.

You can always try out the starter if you find it is better for webextensions