DEV Community

Cover image for Short Intro to Unbundled Development With Snowpack | Part 1
Adib ⚡️
Adib ⚡️

Posted on

Short Intro to Unbundled Development With Snowpack | Part 1

Introduction to Snowpack

Snowpack is a modern, lightweight, and fast Javascript build tool like Webpack and Parcel. The difference between Snowpack and other tools is that Snowpack instead of a rebuild and rebundling entire chunks of your application every time you save a single file, which causes a lag between saving any single file and seeing changes in the browser( Complexity of O(n) ), Snowpack serves the application unbundled during development.
Each file needs to be built only once and then is cached forever, and when you save a file Snowpack builds that single file (Complexity of O(1) ). In this way, Snowpack saves your time.

Alt Text

Install Snowpack

Alt Text

Run thw Snowpack CLI

Alt Text

How to use Snowpack?

The best way to configure Snowpack is with package.json script.

Alt Text

Serve your project

By default, this serves your current working directory to the browser, and it will lock for /index.html file to start.

Build your project

Alt Text

This will generate a static folder /build that you can deploy.

Part 2

Getting Started With React and Snowpack

Top comments (0)