Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Webpack Fundamentals
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Cheesecake Labs
August 16, 2018
Programming
58
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Webpack Fundamentals
Beatriz Silveira
Cheesecake Labs
August 16, 2018
More Decks by Cheesecake Labs
See All by Cheesecake Labs
Cats' wellness & care
cheesecakelabs
0
89
How do we create the first impressions?
cheesecakelabs
0
100
Menstrual cup: suit and freedom
cheesecakelabs
0
120
Life is a cycle, better with a bicycle
cheesecakelabs
0
100
Interview Process: how to get the best of people
cheesecakelabs
1
160
My capsule wardrobe experience
cheesecakelabs
3
110
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
79
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
93
MBTI - Psychological types described by Jung
cheesecakelabs
0
180
Other Decks in Programming
See All in Programming
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
150
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
430
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
Next.js: The final boss of Web Performance
guaca
0
250
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Mobile First: as difficult as doing things right
swwweet
225
10k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
4 Signs Your Business is Dying
shpigford
187
23k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
New Earth Scene 8
popppiees
4
2.7k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Transcript
Webpack Fundamentals
Origins
JS it's just scripts
Inline Script
Problems • Doesn't Scale • Too many Scripts • Performance
Problems • Unmaintainable Scripts • Scope • Size • Readability • Fragility
IIFE's - Immediately Invoked Function Expression
IIFE's • Full rebuilds every time • Lots of IIFE's
are slow
How to import JS on Backend? COMMON JS
CommonJS -> NodeJS
JavaScript Modules CommonJS
JavaScript Modules Was too popular, but how to use this
on Browser Commonjs is synchronous !!! No browser support !!! CommonJS
AMD To transfer module syntax from server usage to browser
usage, CommonJS proposed AMD - Asynchronous Module Definition
AMD But, How can I use it ?
RequireJS • Is a JavaScript module loader. • It helps
load modules asynchronously as needed • You can write AMD style module
RequireJS
Browserify • With Browserify, you can use CommonJS module in
browser application • Traverse the dependency tree of your codes and bundle them up in a single file
Browserify
ES6 Module Syntax • Browsers are not ready for this
new syntax. • There are tools available. These tools allow us to use ES6 module syntax today.
Webpack • Webpack is a module bundler. • If it
is the same as Browserify, why would we need yet another module bundler? • Webpack can handle CommonJS, AMD and ES6 modules.
The Core Concepts • Entry • Output • Loaders •
Plugins
Entry Default ./src/index.js webpack.config.js
Output Default ./dist/main.js
Loaders & Rules test A regular expression that instructs the
compiler which files to run the loader against. use An array/string/function that returns loader objects.
Chaining Loaders less-loader css-loader style-loader style.less style.css *.js Inline style
Plugins Allow you to hook into the entire compilation lifecycle
Add new instance of plugin to plugins key in config object
Using during development 1. Webpack's watch mode 2. webpack-dev-server
Webpack's Watch Mode npm run watch
webpack -dev-server webpack.config.js
webpack -dev-server package.json
Tree Shaking Dead-code elimination
Tree Shaking
Tree Shaking
Production Goal - Improve load time 1. Minified bundles 2.
Lighter weight source maps 3. Optimized assets It's recommend writing separate webpack configurations for each environment