DEV Community

Almost no config!!! Snowpack ️ + React + TS

0xkoji on January 21, 2021

Recently, I have seen Snowpack so many times, so I think it's time to try it. Actually, we can use create-snowpack-app to create a base app, but ...
Collapse
 
matjones profile image
Mat Jones

You can make a React app with literally no configuration using Parcel 😎

Collapse
 
raulfdm profile image
Raul Melo • Edited

Snowpack is conceptually and fundamentally differently from Parcel:

"Snowpack is a modern, lightweight build tool for faster web development. Traditional JavaScript build tools like webpack and Parcel need to rebuild & rebundle entire chunks of your application every time you save a single file. This rebundling step introduces lag between hitting save on your changes and seeing them reflected in the browser. [...]"

snowpack.dev/concepts/how-snowpack...

Collapse
 
matjones profile image
Mat Jones

Yep I know, I was just talking about configuration.

Collapse
 
heyprotagonist profile image
Anguram Shanmugam • Edited

I'm still in confuse which one choose and settle in between snowpack and parcel. ¯\(ツ)

Collapse
 
0xkoji profile image
0xkoji

It would depend on your project. If the project is a kind of prototyping, parcel will be a good option. If not, you can try snowpack. However, there are some options for a js project such as webpack, rollup, esbuild, roma, and so on. I think webpack is very popular.

Thread Thread
 
heyprotagonist profile image
Anguram Shanmugam

webpack is so popular. even @fredkschott mentioned in stream. most of the fallbacks are based on webpack. he said it became a sorta industry standared.

Collapse
 
0xkoji profile image
0xkoji

Yeah, that is true

Collapse
 
dcsan profile image
dc

what's the comparison with webpack or parcel? is build time noticeably faster? is TS integration better?

Collapse
 
mohdahmad1 profile image
Mohd Ahmad

How can we use it with react ssg or ssr

Collapse
 
aminemx profile image
Amine Kaddache

and after all, you realize that will not work with yarn workspaces or any monorepo installation, because snowpack will cache it hardly and will not see changes

Collapse
 
davidevaldo profile image
DaveDanuve

Private npm packages are just a better solution

Snowpack's philosophy is to keep the toolchain minimal, using that and monorepos at the same time is kind of a paradox :)

Collapse
 
shinm profile image
Mikhail

Nice article, Thanks.
However, I guess your first example in the code doesn't get built because you haven't defined ImageWrapper yet

Collapse
 
0xkoji profile image
0xkoji

Good catch!
Thank you for pointing out that. I just updated the article.