Run capacitor without react-scripts


It seems like ionic capacitor run ios -l --address= is running react-scripts start by default.

Is there a way to run my ejected React app (From CRA) without using react-scripts in Ionic? I need to eject CRA to customise my Webpack.


Hey there! At the moment, the CLI is hard-coded to call react-scripts directly. We should probably revisit this and setup a script that we can run from package.json.

Yeah would be awesome if Ionic/Capacitor supports that.

Although it’s not really a show stopper but any eta when that will roll?

Thanks in advance!

1 Like

Indeed, that would be great. react-scripts pulls in loads of unnecessary dependencies.

Hello. It’s blocker for me. I have an existing project and would like to use ionic, but I have my own build pipeline, incompatible with react-scripts. So I have to rewrite the whole project to fit CRA requirements to use ionic.

By the way, while angular-cli is a rich and powerful tool and de-facto the standard in angular world, react-scripts is just a bunch of non-configurable build scripts with tons of narrow limitations.

Is it possible to unbind scripts with react-scripts and (for example) bind it with some npm scripts? (when I have to provide some scripts in package.json scripts section)

It would be a fat lot of good if you could remove this blocker


@fend25 ,
I noticed it’s the build bit that really requires react-scripts

It worked for me when I ran my build command separate (without react-scripts)
npm run build
ionic capacitor run platform --no-build