Bundlers have been the standard in web development over recent years, but as your application grows in size, so too does the bundle times. This creates issues for developers and costs everyone precious time.
Snowpack is a build tool that addresses this issue by serving an unbundled application. They have a great blog post explaining how they got to the version 2 release.
In my own work, I have been getting unbelievably frustrated with build times and have been very keen to explore Snowpack. At first, I played around with their Create Snowpack App starter, but want to know how I could run with Create React App and add Snowpack instead.
There really hasn’t been many posts available on how to do this, so I decided to go it on my own with some trial and error. Here are the short steps that you can take to start developing in O(1) build times with a fresh Create React App project!
Note: This tutorial ran with
create-react-app@3.4.1
andsnowpack@2.6.4
.
Create a new React project with the following:
npx create-react-app snowpack-uplift
This will create the default create-react-app
setup into the snowpack-uplift
folder.
Add a .babelrc
file to your root directory and add the following:
{
"presets": ["@babel/preset-react"]
}
#tutorial #webdev #react #beginner #react app #snowpack