Webpack
2020.06.25 by Jayden
SECTION 1:
Introduction to Webpack
What is Webpack?
Webpack is a static module bundler for modern JavaScript applications. When webpack
processes your application, it internally builds a dependency graph which maps every
module your project needs and generates one or more bundles.
Dependency Graph
• Webpack dependency Dependency Graph
• Entry points dependency Dependency Graph
• Dependency Graph
• Webpack Analyzer
class101 web dependency graphclass101 web webpack-stats data
SECTION 2:
Introduction to Webpack configuration
Entry
• Entry points dependency graph
• entry "./src/index.js" ,
"webpack.config.js" entry
Multiple Entry Points
Single Entry Points
Output
• output
• output main output file
"./dist/main.js" ,
"./dist"
Loaders
• webpack Javascript, JSON
loader
• loader webpack
dependency graph
Plugins
• loader
, plugin , asset ,
•
, "new"
Mode
• mode webpack mode
built-in
• mode "development", "production",
"none" ,
`production`
 webpack built-in optimizations
SECTION 3:
Class101 Web webpack.config.js
https://github.com/john015/webpack-demo
Q&A
Reference
• https://webpack.js.org/concepts/
• https://webpack.js.org/plugins/

Webpack 살펴보기