5 ms·
Has anyone used Parcel as a replacement for create-react-app? I own some tools for generating React projects in an enterprise environment and CRA (specifically
by ng12 7y ago
Has anyone used Parcel as a replacement for create-react-app? I own some tools for generating React projects in an enterprise environment and CRA (specifically react-scripts) has been a huge thorn in my side. Most of these projects are small to medium size and so they don't really warrant custom Webpack configurations. I'd prefer something with react-script's simplicity but without it's absurd restrictions.
- jdmg94 7y agoI think Parcel would be a great option for your use case, shameless plug I have a boilerplate repo you could fork to get started: https://github.com/jdmg94/minimum-parcel-lib https://github.com/jdmg94/minimum-parcel-lib
- ratww 7y agoI use Parcel by default in such projects. Out of the box, with the default configuration, it already supports JSX, including hot-module reloading. So yes, it could be a replacement.
- jjeaff 7y agoYes. And the create react app documentation actually links to parcel as an alternative. I messed around with webpack, gulp, and others for weeks trying to find a good option that could handle my existing code alongside newer code that would be written in react and that could handle multiple entrypoints. I had a difficult time with most tools until I tried parcel, and it just worked. Have an entrypoints for a react app? Include that in the build and parcel can bundle and deploy with no configuration. It just knows it's react because of the import react statement. Want to use typescript with react? Just use .ts files. So my parcel command while developing is something like 'parcel watch src/*.ts. I just put my entrypoints there and my components below that. I've actually been able to just code for a while now without having to fuss with build tools.
- ng12 7y agoThanks for sharing. What about non-build features like testing and linting? I think that's the one thing I'd miss from react-scripts.