Probabynull Profile picture
Jul 19 12 tweets 7 min read
6 core elements of every bundler

Content Creator: @jerry__chang

#webdevelopment #frontenddev #javascript #Reactjs #vuejs #nextjs #remix

1/n
1/n

Bundling isn’t really a new concept.

Many folks have been doing it since Browserify.

These bundlers offer:

1. Bundling system
2. Options for the ability to optimize and other build time modifications
2/n

Here are common elements shared between all the different bundlers.
3/n Resolve

In this step, the bundler is just resolving the file by following import statements.

This could be in the filesystem or from CDN (with new bundlers like snowpack).
4/n Transform

Most of the modern code base are made up of superset syntax that are not supported by browsers.

So, part of the process is transforming that to js, css.

This also means the `import` and `export` statements.
5/n Code splitting

This is an optimization technique where you split up your bundles so you can determine which ones are considered an “entry” bundle.

Entry meaning it’s part of the critical rendering path and it goes well with “Lazy Loading”.
6/n Lazy Loading

Related to code splitting, this technique allows us defer loading part of our app.

Breaking the bundles and loading it in separately allows us to optimize the performance.
7/n Minification

If you’ve inspected your final bundle, you probably have noticed that the bundler replaces your variables and functions.

This allows us to keep our final bundle we send to the browser lean.
8/n Tree shaking

Also known as dead code elimination.

Most bundlers do this by default where it would remove any code that is unused.

A common example is bundles from a component library.

⚠️ This is a great optimization technique but be careful of “side effects”
9/n Recap of the 6 elements
10/n

That’s it!

If you found this helpful please share this with someone 📬

Also, follow @probablynull to level up your #dev, #javascript, #Reactjs, #aws and #Cloud skills!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Probabynull

Probabynull Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @probablynull

May 19
What I wish I knew about software testing 🧵 1/12

🎨 Content Creator: @jerry__chang

#Softwaretesting #DevOps
2/11 Know the why

Know the “why” is half the battle.
3/11 Contracts in your code

Think of it as a contract.

When you design your software, you want to be able to say my code should do x, y z under these conditions.
Read 12 tweets
Jan 21
1/8 AWS Aurora Security 🧵👇

🎨 Content Creator: @jerry__chang

#AWS #Database #PostgreSQL #MySQL
2/8 Isolate the resources from the internet (not publicly accessible)
3/8 Leverage security groups to control network traffic for the individual resources.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(