In order to use tailwind, I would like to build the app using craco (see https://tailwindcss.com/docs/guides/create-react-app).
Is it possible to customize https://ionicframework.com/docs/cli/commands/build command?
The documentation is not really clear about what does ionic build does, but it looks like it call "create scripts" build for react apps.
A workaround is to manually build the app, then running ionic capacitor build --no-buid : https://ionicframework.com/docs/cli/commands/capacitor-build
Is it the right way to customize the build today? A better build documentation (especially about customization) would be really really nice.
I have not actually tested this, but I think this may be able to be accomplished by adding custom ionic:build, ionic:start, etc scripts to your package.json.
Something along the lines of:
"scripts": {
"ionic:build": "craco build",
"ionic:serve": "craco start",
....
}
This is (briefly) mentioned in the documentation here.
That worked properly @kelchm. Thanks!
Indeed I wanna to find some way to create kind of a 'staging ionic build' that use the staging env file with react, and your tips will be very usefull.
Worked for me as well. Maybe we can add this to the docs in respective commands.
Otherwise the issue can be closed
Most helpful comment
I have not actually tested this, but I think this may be able to be accomplished by adding custom
ionic:build,ionic:start, etc scripts to yourpackage.json.Something along the lines of:
This is (briefly) mentioned in the documentation here.