Quick Start Guide to Parcel JS
Skills:
AI Workflow Automation60%
Key Takeaways
Uses Parcel JS to compile Sass/SCSS and JS files
Full Transcript
hey everybody I wanted to do a little tutorial on parcel now if you already use webpack or gulp you know that we need these tools to do things like compile our sass files and CSS files and concatenate our JavaScript files and minify them now web pack and gulp are great tools not knocking them at all but one pain point that I found is that you do have to set up this config file before you can even do anything and of course this is great if you have a complex website and you have a lot of tasks that you need to have that extra level of control but if you're a beginner or you're just setting up a really quick front-end website projects you don't want to have to spend all that extra time setting up all your configuration for your build this is where parcel comes in even just out of the box it comes with a lot of defaults where it'll automatically convert your sass files of CSS files and you can concatenate multiple JavaScript files into one file so it'll save you a lot of time and honestly I think I'm going to be using parcel from now on instead of gulp at least for all my simple projects so let's get started and I'll show you how you can get up and running with parcel in just a few minutes I think you're gonna really like this so here's our website it's at parcel J org they say they are blazing fast you're a configuration web application bundler which I suppose is true let's click on this get started ok like everything else you can install parcel on the command line by using NPM or gulp or I'm sorry NPM or yarn and we're gonna use the yarn in this case so I have this little mini project setup array with like an HTML file a JavaScript file and a sass file so let us install parcel ok pretty easy and then the next thing we want to do is create a package JSON file so er9 it ok here's a package JSON file is just you know our basic information here and then the next thing to do is to run parcel to build your website all you have to do is type parcel and then your HTML file in my case it's index.html and we can see here another awesome part of parcel is that it will spin up a local server for you so localhost with port 1 2 3 4 everything's been built and let's check that out alright so as you can see this website it's just very bare-bones I just wanted to create a simple site to you know just demonstrate different things and test out some of the compiling and make sure possible does everything we want to do and yes this text is upside down if you just need the basic configuration that's literally all you need to do now let's see how parcel works in our index.html file we're loading up here our script JS file so in here in our JavaScript file this is where you can import your sass files or you know other father's for using less but I think most people nowadays use sass and I personally use the S CSS syntax for sass so import that here and then I added some JavaScript here I had this thing with es6 syntax just to test that so that's how parsil works when you run the parcel command on the command line it has this dist folder and in it it adds the compiled HTML CSS and JavaScript files you can see here in the original HTML file there's no reference to your CSS file but in the compiled one it did add the link to the CSS file which is here and this is basically everything that I had in my sass file and obviously it has the JavaScript file which has a lot of parcel stuff but here's the code that I had added here so it just does a lot of things for you and you don't need to worry about them now one thing I did want to check was we want to make sure that our CSS styles that need prefixing have their prefixes and if you see here I have a transform property in the CSS file it's just transform we don't have the WebKit one so what do we to do for that if you if we look back on their website we can see that they actually have pretty good documentation on different things you can compile and build so under this CSS section so you can use poast CSS to use autoprefixer autoprefixer excuse me which is what we want to do so unfortunately this doesn't mean that we need to create a config file but let's add autoprefixer down here so we'll stop our staging server and install post CSS and it's thinking all right everything's done so now in our package JSON file you can see that we have autoprefixer and post CSS modules added so let's just rerun parcel index.html oh I'm sorry actually I forgot we need to create this config file post CSS RC so we'll create that new file here I'm gonna test this out but I did run into some issues earlier when I was trying to do this we will deal with those as they come so let's rebuild and you can see it's installing sass so it seems like something's happening let's make sure that our website loads quickly and ok looks like something went wrong here the transforms not working there's just no CSS for this test class here so let's see what happened so this is again the compiled CSS file that we have and it looks like it did add our prefix transform property but it did this weird thing that I did read about where before we had just this test class and now it added all this extra like I guess randomly generated stuff I'm assuming to make it unique or something obviously that's not what we want because in our compiled HTML file it still has this class test so I'm not sure exactly what this bug is but it's not something we want to happen I think there might honestly be a mistake in this config here because I looked online somewhere else and they actually didn't have this modules true line and they didn't have this stuff here for autoprefixer so we just had plugins autoprefixer is set to true okay so it looks like it did build when I updated that which is kind of cool so this is our compiled CSS file the test class is back to normal still has Auto prefix tiles and let's load the site actually looks like it auto reloaded which is kind of cool let's test that really quick so we'll go back to our SPSS file let's just do color red let's see if it okay so in the process of running your little staging server anytime you make any kind of change it will yeah it looks like it'll it'll rebuild so that's another cool little feature that parcel does for you that you don't need to hit ctrl R f5 or whatever it is that used to reload your page and the last thing we want to check is you remember we did this es6 syntax here so this is a compiled JavaScript file again and we can see here I had a Const called test number and it has converted it to of R so that's really all you need to do if you just have a simple website project with CSS and JavaScript yeah I'm I'm pretty much gonna just use parcel from now on instead of gulp I think parcel is just it's just so easy to get up and running you can just have this ready to go and maybe a couple minutes anyway I hope you found this tutorial helpful if you have any questions feel free to leave a comment below otherwise we'll see you next time thanks for watching
Original Description
🔥 My course: Responsive Design for Beginners! https://coder-coder.com/responsive/
💻 Become a full-stack web dev with Zero to Mastery: https://academy.zerotomastery.io/a/aff_338z7xnj/external?affcode=441520_ti97uk6b
This video is a quick tutorial on how to use Parcel to compile your Sass/SCSS and JS files. I've been using Gulp as my build tool, but I'm planning on swapping that for Parcel, at least for simple builds. The ease and speed of setup is just amazing. And I love how you need little to no config, depending on what you want Parcel to do.
Hope you enjoy this tutorial on getting up and running with Parcel.js!
SUPPORT THE CHANNEL
⭐ Join channel members and get perks: https://www.youtube.com/channel/UCzNf0liwUzMN6_pixbQlMhQ/join
👏🏽 Hit the THANKS button in any video!
🎨 Get my VS Code theme: https://marketplace.visualstudio.com/items?itemName=CoderCoder.codercoder-dark-theme
WANT TO LEARN WEB DEV?
Check out my courses:
🌟 Responsive Design for Beginners: https://coder-coder.com/responsive/
🌟 Gulp for Beginners: https://coder-coder.com/gulp-course/
RECOMMENDATIONS
⌨ My keyboard, Vissles V84 -- https://vissles.com/?ref=mu96kxst5w -- 🔥 get 10% off with code THECODERCODER --
💻 Other gear -- https://www.amazon.com/shop/thecodercoder?listId=1LMCKGUTMVYXD
📚 My Favorite Books -- https://coder-coder.com/best-web-development-books/
📺 My Favorite Courses -- https://coder-coder.com/best-web-development-courses/
🔽 FOLLOW CODER CODER
Blog -- https://coder-coder.com/
Twitter -- https://twitter.com/thecodercoder
Instagram -- https://www.instagram.com/thecodercoder
#webdevelopment #coding #programming
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Coder Coder · Coder Coder · 5 of 60
1
2
3
4
▶
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
How to Make a Super Simple HTML Website [Tutorial]
Coder Coder
How to make an animated sticky header with CSS and JavaScript!
Coder Coder
How to get coding help by researching online
Coder Coder
IG Live - Advice for beginner web developers
Coder Coder
Quick Start Guide to Parcel JS
Coder Coder
Build a responsive website with HTML & CSS - Part 1 [Live Coding]
Coder Coder
Build a custom Linktree page for Instagram with HTML & CSS
Coder Coder
Gulp 4 Crash Course for Beginners
Coder Coder
How to use CSS position to layout a website
Coder Coder
CSS: 4 Reasons Your Z-Index Isn't Working
Coder Coder
Coding a landing page website with HTML & CSS
Coder Coder
Learn web development as an absolute beginner
Coder Coder
How to write media queries in CSS
Coder Coder
How to build a 2-column layout using flexbox | HTML/CSS
Coder Coder
How to build a simple responsive layout with CSS grid
Coder Coder
Write code faster in VS Code with Emmet shortcuts
Coder Coder
How I setup VS Code for a beginners front-end workflow
Coder Coder
How to make a background-image transparent in CSS
Coder Coder
Build a responsive website from scratch with HTML & CSS | Part 1: Navigation bar
Coder Coder
Animated Hamburger Menu in CSS/JS | Build a responsive website from scratch (Part 2)
Coder Coder
Animated mobile menu with CSS/JS | Build a responsive website from scratch (Part 3)
Coder Coder
How to stay motivated when learning to code?
Coder Coder
Responsive hero | Build a responsive website from scratch (Part 4)
Coder Coder
Responsive 4-column layout with flexbox | Build a responsive website from scratch (Part 5)
Coder Coder
Responsive 4-column layout with CSS Grid | Build a responsive website from scratch (Part 6)
Coder Coder
Building a footer using CSS Grid | Build a responsive website from scratch (Part 7)
Coder Coder
Browsersync + Sass + Gulp in 15 minutes
Coder Coder
Responsive card UI with flexbox and hover effects | HTML/CSS
Coder Coder
CSS grid cards with animated hover effect | HTML/CSS
Coder Coder
How I learned to code and landed a job (no CS degree!)
Coder Coder
Building the website for my course (coding timelapse)
Coder Coder
How to debug your code faster 🔥
Coder Coder
Full timelapse + walkthrough of building my website
Coder Coder
Your questions answered!! ✨100K Q&A✨
Coder Coder
Building a pricing block with HTML & PuRe CSS
Coder Coder
Use the Google Maps API to build a custom map with markers
Coder Coder
Building an accordion with HTML, CSS & JS (Part 1)
Coder Coder
How to make your own VS Code theme!
Coder Coder
How to build an accordion with HTML, CSS, and JavaScript (Part 2)
Coder Coder
Life/channel update
Coder Coder
Building a Light/Dark Dashboard, Part 1
Coder Coder
What is NPM, and why do we need it? | Tutorial for beginners
Coder Coder
Building a Node.js app (as a JavaScript noob) | 🔴 LIVE CODING
Coder Coder
Free website project ideas for your portfolio #shorts
Coder Coder
How to add quickly emojis on Windows #shorts
Coder Coder
Building a Light/Dark Dashboard, Part 2
Coder Coder
Learn to code with these 4 free resources! #shorts
Coder Coder
Learn flexbox with these 4 resources! #shorts
Coder Coder
[Typing sound] Comparing mechanical vs regular keyboard
Coder Coder
Building a Light/Dark Dashboard, Part 3
Coder Coder
what making web development tutorials is really like 😅 #shorts
Coder Coder
Generate website starter files with just one command!
Coder Coder
emojis in code
Coder Coder
Stay motivated when coding: don't compare yourself with others #shorts
Coder Coder
Building a Light/Dark Dashboard, Part 4
Coder Coder
Coding motivation: slow and steady wins the race 🐢🏁
Coder Coder
Sass @import is being replaced with @use and @forward
Coder Coder
Coding motivation tip: keep your goal in mind
Coder Coder
How do websites work?
Coder Coder
Building a Light/Dark Dashboard, Part 5
Coder Coder
More on: AI Workflow Automation
View skill →Related Reads
📰
📰
📰
📰
My first weekend challenge
Dev.to · Dina
Nomad AI Review 2026: Can This AI-Powered Travel Platform Help You Build an Online Business?
Medium · AI
The Only 4 Claude Prompts I Use Every Single Day
Medium · Programming
The Most Valuable Way to Use AI in Your Business Is Also the Most Boring
Medium · AI
🎓
Tutor Explanation
DeepCamp AI