
Show HN: Create-React-app-parcel, a CLI for Creating React Apps with Parcel - swyx
https://github.com/sw-yx/create-react-app-parcel
======
swyx
Hi HN! I made create-react-app-parcel partially as a joke because of the
initials, but also as a nice alternative to create-react-app that doesn't use
webpack.

Here's the feature list from the README:

Preconfigured Features that come with your Parcel setup:

* [babel-preset-react-app]([https://github.com/facebook/create-react-app/tree/next/packa...](https://github.com/facebook/create-react-app/tree/next/packages/babel-preset-react-app)) so you can use the exact same JS features that come with create-react-app (eg public class fields)

* improved `App.js` to show off the babel preset features (click on the React logo!)

* serviceWorker available but off by default (similar to the coming create-react-app 2.0 setup)

* [preconfigured build setup]([https://github.com/sw-yx/create-react-app-parcel/blob/master...](https://github.com/sw-yx/create-react-app-parcel/blob/master/packages/react-scripts-parcel/config/parcel.config.prod.js)) based on the [ParcelJS API]([https://parceljs.org/api.html](https://parceljs.org/api.html))

* nice eject experience that doesnt saddle you with a million webpack plugins

* as far as possible, same DX as create-react-app (eg checks if you use `yarn` or `npm`, environment variables all the same)

I have not done any benchmarks and don't really want to talk about speed
because its bikeshedding imo. I just like using things with good defaults so I
made this for myself.

Happy to answer questions, and take suggestions. Cheers!

~~~
oceanswave
And slow?

[https://x-team.com/blog/rollup-webpack-parcel-
comparison/](https://x-team.com/blog/rollup-webpack-parcel-comparison/)

------
kitd
TIL about Parcel. Anyone with first-hand experience could compare it with
Webpack?

~~~
newsbinator
I tried using it with the Pug plugin and found you can't really reference CSS
or other pug files, because of a relative path bug. Seems to be a known issue.
So that was a showstopper.

~~~
swyx
interesting. it may have been fixed. check this? [https://github.com/parcel-
bundler/parcel/issues?utf8=%E2%9C%...](https://github.com/parcel-
bundler/parcel/issues?utf8=%E2%9C%93&q=is%3Aissue+pug+css+)

------
kaishiro
Ha, nice crap ;)

I've been using Parcel for a couple of weeks now (Vue) and there are
definitely some rough edges to it - but overall it's been far less cumbersome
than Webpack. There _are_ a couple sticky bugs with PostCSS imports, and the
fact that you seemingly cannot do inline background-images currently (parser
doesn't seem to be able to pick them out for the repathing) is a bit of a
killer. But it seems like the team has some good velocity so hopeful things
get worked out.

------
fiatjaf
Thank you for making the world a little less webpack'ed.

~~~
swyx
thanks! I think webpack is still great for big apps but i think parcel is
really promising so I figured I would try making this. Something I'm unsure
about is I ripped out a big long list of webpack plugins to make this, so I
don't actually know if I have feature parity with create-react-app. I think
for the things I care about it does have parity, but others may have concerns
I don't know about.

------
fiatjaf
Is there something like that for Browserify?

~~~
swyx
i dont think so but you could def fork my code and make one! would be happy to
guide you through any issues, it really isn't that hard to make something like
this given that create-react-app has done all the heavy lifting for us. i've
often thought of making a create-create-react-app.

