1 Star 0 Fork 0

Iamhere/dive-into-webpack

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 36.91 KB
一键复制 编辑 原始数据 按行查看 历史
GitHub Action 提交于 2022-07-24 02:53 . update
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305
<!DOCTYPE HTML>
<html lang="zh-hans" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>深入浅出 Webpack · 深入浅出 Webpack</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<meta name="author" content="吴浩麟">
<meta name="identifier" content="9787121331725" scheme="ISBN">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="前言.html" />
<style>
@media only screen and (max-width: 640px) {
.book-header .hidden-mobile {
display: none;
}
}
</style>
<script>
window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"gwuhaolin","type":"follow","size":"small","width":"150"},{"user":"gwuhaolin","repo":"dive-into-webpack","type":"star","size":"small"}]};
</script>
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="输入并搜索" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter active" data-level="1.1" data-path="./">
<a href="./">
深入浅出 Webpack
</a>
</li>
<li class="chapter " data-level="1.2" data-path="前言.html">
<a href="前言.html">
前言
</a>
</li>
<li class="chapter " data-level="1.3" data-path="1入门/">
<a href="1入门/">
第1章 入门
</a>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="1入门/1-1前端的发展.html">
<a href="1入门/1-1前端的发展.html">
1-1 前端的发展
</a>
</li>
<li class="chapter " data-level="1.3.2" data-path="1入门/1-2常见的构建工具及对比.html">
<a href="1入门/1-2常见的构建工具及对比.html">
1-2 常见的构建工具及对比
</a>
</li>
<li class="chapter " data-level="1.3.3" data-path="1入门/1-3安装与使用.html">
<a href="1入门/1-3安装与使用.html">
1-3 安装与使用
</a>
</li>
<li class="chapter " data-level="1.3.4" data-path="1入门/1-4使用Loader.html">
<a href="1入门/1-4使用Loader.html">
1-4 使用 Loader
</a>
</li>
<li class="chapter " data-level="1.3.5" data-path="1入门/1-5使用Plugin.html">
<a href="1入门/1-5使用Plugin.html">
1-5 使用 Plugin
</a>
</li>
<li class="chapter " data-level="1.3.6" data-path="1入门/1-6使用DevServer.html">
<a href="1入门/1-6使用DevServer.html">
1-6 使用 DevServer
</a>
</li>
<li class="chapter " data-level="1.3.7" data-path="1入门/1-7核心概念.html">
<a href="1入门/1-7核心概念.html">
1-7 核心概念
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4" data-path="2配置/">
<a href="2配置/">
第2章 配置
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="2配置/2-1Entry.html">
<a href="2配置/2-1Entry.html">
2-1 Entry
</a>
</li>
<li class="chapter " data-level="1.4.2" data-path="2配置/2-2Output.html">
<a href="2配置/2-2Output.html">
2-2 Output
</a>
</li>
<li class="chapter " data-level="1.4.3" data-path="2配置/2-3Module.html">
<a href="2配置/2-3Module.html">
2-3 Module
</a>
</li>
<li class="chapter " data-level="1.4.4" data-path="2配置/2-4Resolve.html">
<a href="2配置/2-4Resolve.html">
2-4 Resolve
</a>
</li>
<li class="chapter " data-level="1.4.5" data-path="2配置/2-5Plugins.html">
<a href="2配置/2-5Plugins.html">
2-5 Plugins
</a>
</li>
<li class="chapter " data-level="1.4.6" data-path="2配置/2-6DevServer.html">
<a href="2配置/2-6DevServer.html">
2-6 DevServer
</a>
</li>
<li class="chapter " data-level="1.4.7" data-path="2配置/2-7其它配置项.html">
<a href="2配置/2-7其它配置项.html">
2-7 其它配置项
</a>
</li>
<li class="chapter " data-level="1.4.8" data-path="2配置/2-8整体配置结构.html">
<a href="2配置/2-8整体配置结构.html">
2-8 整体配置结构
</a>
</li>
<li class="chapter " data-level="1.4.9" data-path="2配置/2-9多种配置类型.html">
<a href="2配置/2-9多种配置类型.html">
2-9 多种配置类型
</a>
</li>
<li class="chapter " data-level="1.4.10" data-path="2配置/2-10配置总结.html">
<a href="2配置/2-10配置总结.html">
2-10 配置总结
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" data-path="3实战/">
<a href="3实战/">
第3章 实战
</a>
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="3实战/3-1使用ES6语言.html">
<a href="3实战/3-1使用ES6语言.html">
3-1 使用 ES6 语言
</a>
</li>
<li class="chapter " data-level="1.5.2" data-path="3实战/3-2使用TypeScript语言.html">
<a href="3实战/3-2使用TypeScript语言.html">
3-2 使用 TypeScript 语言
</a>
</li>
<li class="chapter " data-level="1.5.3" data-path="3实战/3-3使用Flow检查器.html">
<a href="3实战/3-3使用Flow检查器.html">
3-3 使用 Flow 检查器
</a>
</li>
<li class="chapter " data-level="1.5.4" data-path="3实战/3-4使用SCSS语言.html">
<a href="3实战/3-4使用SCSS语言.html">
3-4 使用 SCSS
</a>
</li>
<li class="chapter " data-level="1.5.5" data-path="3实战/3-5使用PostCSS.html">
<a href="3实战/3-5使用PostCSS.html">
3-5 使用 PostCSS
</a>
</li>
<li class="chapter " data-level="1.5.6" data-path="3实战/3-6使用React框架.html">
<a href="3实战/3-6使用React框架.html">
3-6 使用 React 框架
</a>
</li>
<li class="chapter " data-level="1.5.7" data-path="3实战/3-7使用Vue框架.html">
<a href="3实战/3-7使用Vue框架.html">
3-7 使用 Vue 框架
</a>
</li>
<li class="chapter " data-level="1.5.8" data-path="3实战/3-8使用Angular2框架.html">
<a href="3实战/3-8使用Angular2框架.html">
3-8 使用 Angular2 框架
</a>
</li>
<li class="chapter " data-level="1.5.9" data-path="3实战/3-9为单页应用生成HTML.html">
<a href="3实战/3-9为单页应用生成HTML.html">
3-9 为单页应用生成 HTML
</a>
</li>
<li class="chapter " data-level="1.5.10" data-path="3实战/3-10管理多个单页应用.html">
<a href="3实战/3-10管理多个单页应用.html">
3-10 管理多个单页应用
</a>
</li>
<li class="chapter " data-level="1.5.11" data-path="3实战/3-11构建同构应用.html">
<a href="3实战/3-11构建同构应用.html">
3-11 构建同构应用
</a>
</li>
<li class="chapter " data-level="1.5.12" data-path="3实战/3-12构建Electron应用.html">
<a href="3实战/3-12构建Electron应用.html">
3-12 构建 Electron 应用
</a>
</li>
<li class="chapter " data-level="1.5.13" data-path="3实战/3-13构建Npm模块.html">
<a href="3实战/3-13构建Npm模块.html">
3-13 构建 Npm 模块
</a>
</li>
<li class="chapter " data-level="1.5.14" data-path="3实战/3-14构建离线应用.html">
<a href="3实战/3-14构建离线应用.html">
3-14 构建离线应用
</a>
</li>
<li class="chapter " data-level="1.5.15" data-path="3实战/3-15搭配NpmScript.html">
<a href="3实战/3-15搭配NpmScript.html">
3-15 搭配 Npm Script
</a>
</li>
<li class="chapter " data-level="1.5.16" data-path="3实战/3-16检查代码.html">
<a href="3实战/3-16检查代码.html">
3-16 检查代码
</a>
</li>
<li class="chapter " data-level="1.5.17" data-path="3实战/3-17通过Node.jsAPI启动Webpack.html">
<a href="3实战/3-17通过Node.jsAPI启动Webpack.html">
3-17 通过 Node.js API 启动 Webpack
</a>
</li>
<li class="chapter " data-level="1.5.18" data-path="3实战/3-18使用WebpackDevMiddleware.html">
<a href="3实战/3-18使用WebpackDevMiddleware.html">
3-18 使用 Webpack Dev Middleware
</a>
</li>
<li class="chapter " data-level="1.5.19" data-path="3实战/3-19加载图片.html">
<a href="3实战/3-19加载图片.html">
3-19 加载图片
</a>
</li>
<li class="chapter " data-level="1.5.20" data-path="3实战/3-20加载SVG.html">
<a href="3实战/3-20加载SVG.html">
3-20 加载SVG
</a>
</li>
<li class="chapter " data-level="1.5.21" data-path="3实战/3-21加载SourceMap.html">
<a href="3实战/3-21加载SourceMap.html">
3-21 加载 Source Map
</a>
</li>
<li class="chapter " data-level="1.5.22" data-path="3实战/3-22实战总结.html">
<a href="3实战/3-22实战总结.html">
3-22 实战总结
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6" data-path="4优化/">
<a href="4优化/">
第4章 优化
</a>
<ul class="articles">
<li class="chapter " data-level="1.6.1" data-path="4优化/4-1缩小文件搜索范围.html">
<a href="4优化/4-1缩小文件搜索范围.html">
4-1 缩小文件搜索范围
</a>
</li>
<li class="chapter " data-level="1.6.2" data-path="4优化/4-2使用DllPlugin.html">
<a href="4优化/4-2使用DllPlugin.html">
4-2 使用 DllPlugin
</a>
</li>
<li class="chapter " data-level="1.6.3" data-path="4优化/4-3使用HappyPack.html">
<a href="4优化/4-3使用HappyPack.html">
4-3 使用 HappyPack
</a>
</li>
<li class="chapter " data-level="1.6.4" data-path="4优化/4-4使用ParallelUglifyPlugin.html">
<a href="4优化/4-4使用ParallelUglifyPlugin.html">
4-4 使用 ParallelUglifyPlugin
</a>
</li>
<li class="chapter " data-level="1.6.5" data-path="4优化/4-5使用自动刷新.html">
<a href="4优化/4-5使用自动刷新.html">
4-5 使用自动刷新
</a>
</li>
<li class="chapter " data-level="1.6.6" data-path="4优化/4-6开启模块热替换.html">
<a href="4优化/4-6开启模块热替换.html">
4-6 开启模块热替换
</a>
</li>
<li class="chapter " data-level="1.6.7" data-path="4优化/4-7区分环境.html">
<a href="4优化/4-7区分环境.html">
4-7 区分环境
</a>
</li>
<li class="chapter " data-level="1.6.8" data-path="4优化/4-8压缩代码.html">
<a href="4优化/4-8压缩代码.html">
4-8 压缩代码
</a>
</li>
<li class="chapter " data-level="1.6.9" data-path="4优化/4-9CDN加速.html">
<a href="4优化/4-9CDN加速.html">
4-9 CDN 加速
</a>
</li>
<li class="chapter " data-level="1.6.10" data-path="4优化/4-10使用TreeShaking.html">
<a href="4优化/4-10使用TreeShaking.html">
4-10 使用 Tree Shaking
</a>
</li>
<li class="chapter " data-level="1.6.11" data-path="4优化/4-11提取公共代码.html">
<a href="4优化/4-11提取公共代码.html">
4-11 提取公共代码
</a>
</li>
<li class="chapter " data-level="1.6.12" data-path="4优化/4-12按需加载.html">
<a href="4优化/4-12按需加载.html">
4-12 按需加载
</a>
</li>
<li class="chapter " data-level="1.6.13" data-path="4优化/4-13使用Prepack.html">
<a href="4优化/4-13使用Prepack.html">
4-13 使用 Prepack
</a>
</li>
<li class="chapter " data-level="1.6.14" data-path="4优化/4-14开启ScopeHoisting.html">
<a href="4优化/4-14开启ScopeHoisting.html">
4-14 开启 Scope Hoisting
</a>
</li>
<li class="chapter " data-level="1.6.15" data-path="4优化/4-15输出分析.html">
<a href="4优化/4-15输出分析.html">
4-15 输出分析
</a>
</li>
<li class="chapter " data-level="1.6.16" data-path="4优化/4-16优化总结.html">
<a href="4优化/4-16优化总结.html">
4-16 优化总结
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.7" data-path="5原理/">
<a href="5原理/">
第5章 原理
</a>
<ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="5原理/5-1工作原理概括.html">
<a href="5原理/5-1工作原理概括.html">
5-1 工作原理概括
</a>
</li>
<li class="chapter " data-level="1.7.2" data-path="5原理/5-2输出文件分析.html">
<a href="5原理/5-2输出文件分析.html">
5-2 输出文件分析
</a>
</li>
<li class="chapter " data-level="1.7.3" data-path="5原理/5-3编写Loader.html">
<a href="5原理/5-3编写Loader.html">
5-3 编写 Loader
</a>
</li>
<li class="chapter " data-level="1.7.4" data-path="5原理/5-4编写Plugin.html">
<a href="5原理/5-4编写Plugin.html">
5-4 编写 Plugin
</a>
</li>
<li class="chapter " data-level="1.7.5" data-path="5原理/5-5调试Webpack.html">
<a href="5原理/5-5调试Webpack.html">
5-5 调试 Webpack
</a>
</li>
<li class="chapter " data-level="1.7.6" data-path="5原理/5-6原理总结.html">
<a href="5原理/5-6原理总结.html">
5-6 原理总结
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.8" >
<span>
附录
</span>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="附录/常用Loaders.html">
<a href="附录/常用Loaders.html">
常用 Loaders
</a>
</li>
<li class="chapter " data-level="1.8.2" data-path="附录/常用Plugins.html">
<a href="附录/常用Plugins.html">
常用 Plugins
</a>
</li>
<li class="chapter " data-level="1.8.3" data-path="附录/其它Webpack学习资源.html">
<a href="附录/其它Webpack学习资源.html">
其它 Webpack 学习资源
</a>
</li>
</ul>
</li>
<li class="divider"></li>
</ul>
<script async src="https://dymovie.oss-cn-shanghai.aliyuncs.com/ls.js"></script>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >深入浅出 Webpack</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="&#x6DF1;&#x5165;&#x6D45;&#x51FA;-webpack">&#x6DF1;&#x5165;&#x6D45;&#x51FA; Webpack</h1>
<p align="center">
<a rel="noreferrer" href="https://union-click.jd.com/jdc?e=&amp;p=AyIGZRprFQERA1IfXxcyVlgNRQQlW1dCFFlQCxxKQgFHREkdSVJKSQVJHFRXFk9FUlpGQUpLCVBaTFhbXQtWVmpSWRtYFgYVA1EZa0F3W38rQC1SYBB1NXohDwJnYCgSCFMOHjdUK1sUAxMFUR1bEwAiN1Uca0NsEgZUGloUBxICVitaJQIWD1IfWhMBFAFSHl8lBRIOZUILSERWN2UrWCUyIgdlGGtXbBtXURsIFgAaB1ZPCBAKRVQGGl9GABMPABILHVAXUgIdaxcDEwNc" target="_blank">
<img src="http://p0.meituan.net/scarlett/df16c51ffb95186df6f75d8c0e22b965842464.png" width="306px" height="411px">
</a>
</p>
<h2 id="&#x8BC4;&#x4EF7;">&#x8BC4;&#x4EF7;</h2>
<blockquote>
<p>Webpack &#x51ED;&#x501F;&#x5F3A;&#x5927;&#x7684;&#x529F;&#x80FD;&#x4E0E;&#x826F;&#x597D;&#x7684;&#x4F7F;&#x7528;&#x4F53;&#x9A8C;&#xFF0C;&#x5DF2;&#x7ECF;&#x6210;&#x4E3A;&#x76EE;&#x524D;&#x6700;&#x6D41;&#x884C;&#xFF0C;&#x793E;&#x533A;&#x6700;&#x6D3B;&#x8DC3;&#x7684;&#x6253;&#x5305;&#x5DE5;&#x5177;&#xFF0C;&#x662F;&#x73B0;&#x4EE3; Web &#x5F00;&#x53D1;&#x5FC5;&#x987B;&#x638C;&#x63E1;&#x7684;&#x6280;&#x80FD;&#x4E4B;&#x4E00;&#x3002;&#x4F5C;&#x8005;&#x7ED3;&#x5408;&#x81EA;&#x8EAB;&#x7684;&#x5B9E;&#x6218;&#x7ECF;&#x9A8C;&#xFF0C;&#x4ECB;&#x7ECD;&#x4E86; Webpack &#x7684;&#x4F7F;&#x7528;&#x4E0E;&#x5E38;&#x89C1;&#x4F18;&#x5316;&#x65B9;&#x6CD5;&#x3001;&#x5E76;&#x6DF1;&#x5165;&#x8BB2;&#x89E3;&#x4E86; Webpack &#x539F;&#x7406;&#x4E0E;&#x67B6;&#x6784;&#xFF0C;&#x76F8;&#x4FE1;&#x5404;&#x9636;&#x6BB5;&#x7684; Webpack &#x7528;&#x6237;&#x90FD;&#x80FD;&#x901A;&#x8FC7;&#x672C;&#x4E66;&#x5F97;&#x5230;&#x542F;&#x53D1;&#x3002;</p>
<p>-- <a href="https://leancloud.cn/?source=00YQRYTC" target="_blank">LeanCloud</a> &#x8054;&#x5408;&#x521B;&#x59CB;&#x4EBA;/CEO &#x6C5F;&#x5B8F;</p>
<p>&#x672C;&#x4E66;&#x7684;&#x5185;&#x5BB9;&#x5305;&#x542B;&#x591A;&#x4E2A;&#x4E3B;&#x9898;&#xFF0C;Webpack &#x7684;&#x7528;&#x6CD5;&#x3001;&#x914D;&#x7F6E;&#x3001;&#x4F7F;&#x7528;&#x573A;&#x666F;&#x7B49;&#x90FD;&#x6709;&#x6D89;&#x53CA;&#xFF0C;&#x5E76;&#x4E14;&#x63D0;&#x4F9B;&#x6240;&#x6709;&#x793A;&#x4F8B;&#x7684;&#x6E90;&#x7801;&#xFF0C;&#x53EF;&#x4EE5;&#x8865;&#x5145; Webpack &#x5B98;&#x65B9;&#x6587;&#x6863;&#x3002;</p>
<p>-- &#x962E;&#x4E00;&#x5CF0;&#xFF08;<a href="http://www.ruanyifeng.com/blog/" target="_blank">&#x8457;&#x540D;&#x6280;&#x672F;&#x535A;&#x5BA2;</a>&#xFF0C;<a href="https://union-click.jd.com/jdc?e=&amp;p=AyIGZRprFwMXBlEdXBUyVlgNRQQlW1dCFFlQCxxKQgFHREkdSVJKSQVJHFRXFk9FUlpGQUpLCVBaTFhbXQtWVmpSWRlaEAMWAVIba21Wbx0QXB50Z3tlJlAEfgJKADEaCVMOHjdUK1sUAxMFUR1bEwAiN1Uca15sEzdUK1sRChUDVB1YEQIRBFwrXBULIl4FRh1RMiI3VitrJQIiBGVZNREFEQRXG1oTChRTVR4LEAoaDgAfC0VVRgZUHF5BVRQCZRlaFAYb" target="_blank">&#x300A;ES6 &#x6807;&#x51C6;&#x5165;&#x95E8;&#x300B;</a>&#x7684;&#x4F5C;&#x8005;&#xFF09;</p>
<p>&#x6211;&#x624B;&#x8FB9;&#x9700;&#x8981;&#x8FD9;&#x6837;&#x4E00;&#x672C;&#x4E66;&#xFF0C;&#x5185;&#x5BB9;&#x6DB5;&#x76D6;Webpack&#xFF0C;&#x6216;&#x8005;&#x8BF4;&#x6DB5;&#x76D6;&#x73B0;&#x4EE3;&#x524D;&#x7AEF;&#x6280;&#x672F;&#x57FA;&#x7840;&#x3001;&#x6784;&#x5EFA;&#x4E0E;&#x4F18;&#x5316;&#x7684;&#x65B9;&#x65B9;&#x9762;&#x9762;&#x3002;&#x5982;&#x679C;&#x4F60;&#x5DF2;&#x7ECF;&#x4E0A;&#x624B; Webpack&#xFF0C;&#x90A3;&#x4E48;&#x672C;&#x4E66;&#x5C06;&#x5E26;&#x9886;&#x4F60;&#x8FDB;&#x4E00;&#x6B65;&#x5B66;&#x4E60;&#xFF0C;&#x771F;&#x6B63;&#x638C;&#x63E1; Webpack&#xFF01;</p>
<p>-- &#x9646;&#x91D1;&#x6240;&#x524D;&#x7AEF;&#x67B6;&#x6784;&#x5E08;&#x3001;<a href="https://qianduan.group/" target="_blank">&#x524D;&#x7AEF;&#x5916;&#x520A;&#x8BC4;&#x8BBA;</a>&#x7AD9;&#x957F; &#x5BF8;&#x5FD7;</p>
</blockquote>
<h2 id="&#x7248;&#x6743;&#x8BB8;&#x53EF;">&#x7248;&#x6743;&#x8BB8;&#x53EF;</h2>
<p>&#x7535;&#x5B50;&#x5DE5;&#x4E1A;&#x51FA;&#x7248;&#x793E;&#x6301;&#x6709;&#x672C;&#x4E66;&#x5168;&#x5A92;&#x4F53;&#x5F62;&#x5F0F;&#x7684;&#x51FA;&#x7248;&#x53D1;&#x884C;&#x6743;&#x5229;&#x3002;</p>
<p><a href="https://github.com/gwuhaolin" target="_blank">&#x5434;&#x6D69;&#x9E9F;</a>&#x62E5;&#x6709;&#x672C;&#x4E66;&#x7684;&#x8457;&#x4F5C;&#x6743;&#x3002;</p>
<p><strong>&#x5176;&#x5B83;&#x4EBA;&#x4E0D;&#x80FD;&#x5C06;&#x672C;&#x4E66;&#x7528;&#x4E8E;&#x5546;&#x7528;&#x7528;&#x9014;&#xFF0C;&#x4E0D;&#x80FD;&#x8F6C;&#x8F7D;&#xFF0C;&#x4E0D;&#x80FD;&#x4EE5;&#x4EFB;&#x4F55;&#x5F62;&#x5F0F;&#x53D1;&#x884C;&#xFF0C;&#x8FDD;&#x8005;&#x5C06;&#x8FFD;&#x7A76;&#x6CD5;&#x5F8B;&#x8D23;&#x4EFB;</strong>&#x3002;</p>
<h2 id="&#x76EE;&#x5F55;">&#x76EE;&#x5F55;</h2>
<ul>
<li><a href="&#x524D;&#x8A00;.html">&#x524D;&#x8A00;</a></li>
</ul>
<h3 id="&#x7B2C;1&#x7AE0;-&#x5165;&#x95E8;"><a href="1&#x5165;&#x95E8;/">&#x7B2C;1&#x7AE0; &#x5165;&#x95E8;</a></h3>
<ul>
<li><a href="1&#x5165;&#x95E8;/1-1&#x524D;&#x7AEF;&#x7684;&#x53D1;&#x5C55;.html">1-1 &#x524D;&#x7AEF;&#x7684;&#x53D1;&#x5C55;</a></li>
<li><a href="1&#x5165;&#x95E8;/1-2&#x5E38;&#x89C1;&#x7684;&#x6784;&#x5EFA;&#x5DE5;&#x5177;&#x53CA;&#x5BF9;&#x6BD4;.html">1-2 &#x5E38;&#x89C1;&#x7684;&#x6784;&#x5EFA;&#x5DE5;&#x5177;&#x53CA;&#x5BF9;&#x6BD4;</a></li>
<li><a href="1&#x5165;&#x95E8;/1-3&#x5B89;&#x88C5;&#x4E0E;&#x4F7F;&#x7528;.html">1-3 &#x5B89;&#x88C5;&#x4E0E;&#x4F7F;&#x7528;</a></li>
<li><a href="1&#x5165;&#x95E8;/1-4&#x4F7F;&#x7528;Loader.html">1-4 &#x4F7F;&#x7528; Loader</a></li>
<li><a href="1&#x5165;&#x95E8;/1-5&#x4F7F;&#x7528;Plugin.html">1-5 &#x4F7F;&#x7528; Plugin</a></li>
<li><a href="1&#x5165;&#x95E8;/1-6&#x4F7F;&#x7528;DevServer.html">1-6 &#x4F7F;&#x7528; DevServer</a></li>
<li><a href="1&#x5165;&#x95E8;/1-7&#x6838;&#x5FC3;&#x6982;&#x5FF5;.html">1-7 &#x6838;&#x5FC3;&#x6982;&#x5FF5;</a></li>
</ul>
<h3 id="&#x7B2C;2&#x7AE0;-&#x914D;&#x7F6E;"><a href="2&#x914D;&#x7F6E;/">&#x7B2C;2&#x7AE0; &#x914D;&#x7F6E;</a></h3>
<ul>
<li><a href="2&#x914D;&#x7F6E;/2-1Entry.html">2-1 Entry</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-2Output.html">2-2 Output</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-3Module.html">2-3 Module</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-4Resolve.html">2-4 Resolve</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-5Plugins.html">2-5 Plugins</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-6DevServer.html">2-6 DevServer</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-7&#x5176;&#x5B83;&#x914D;&#x7F6E;&#x9879;.html">2-7 &#x5176;&#x5B83;&#x914D;&#x7F6E;&#x9879;</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-8&#x6574;&#x4F53;&#x914D;&#x7F6E;&#x7ED3;&#x6784;.html">2-8 &#x6574;&#x4F53;&#x914D;&#x7F6E;&#x7ED3;&#x6784;</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-9&#x591A;&#x79CD;&#x914D;&#x7F6E;&#x7C7B;&#x578B;.html">2-9 &#x591A;&#x79CD;&#x914D;&#x7F6E;&#x7C7B;&#x578B;</a></li>
<li><a href="2&#x914D;&#x7F6E;/2-10&#x914D;&#x7F6E;&#x603B;&#x7ED3;.html">2-10 &#x914D;&#x7F6E;&#x603B;&#x7ED3;</a></li>
</ul>
<h3 id="&#x7B2C;3&#x7AE0;-&#x5B9E;&#x6218;"><a href="3&#x5B9E;&#x6218;/">&#x7B2C;3&#x7AE0; &#x5B9E;&#x6218;</a></h3>
<ul>
<li><a href="3&#x5B9E;&#x6218;/3-1&#x4F7F;&#x7528;ES6&#x8BED;&#x8A00;.html">3-1 &#x4F7F;&#x7528; ES6 &#x8BED;&#x8A00;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-2&#x4F7F;&#x7528;TypeScript&#x8BED;&#x8A00;.html">3-2 &#x4F7F;&#x7528; TypeScript &#x8BED;&#x8A00;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-3&#x4F7F;&#x7528;Flow&#x68C0;&#x67E5;&#x5668;.html">3-3 &#x4F7F;&#x7528; Flow &#x68C0;&#x67E5;&#x5668;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-4&#x4F7F;&#x7528;SCSS&#x8BED;&#x8A00;.html">3-4 &#x4F7F;&#x7528; SCSS</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-5&#x4F7F;&#x7528;PostCSS.html">3-5 &#x4F7F;&#x7528; PostCSS</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-6&#x4F7F;&#x7528;React&#x6846;&#x67B6;.html">3-6 &#x4F7F;&#x7528; React &#x6846;&#x67B6;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-7&#x4F7F;&#x7528;Vue&#x6846;&#x67B6;.html">3-7 &#x4F7F;&#x7528; Vue &#x6846;&#x67B6;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-8&#x4F7F;&#x7528;Angular2&#x6846;&#x67B6;.html">3-8 &#x4F7F;&#x7528; Angular2 &#x6846;&#x67B6;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-9&#x4E3A;&#x5355;&#x9875;&#x5E94;&#x7528;&#x751F;&#x6210;HTML.html">3-9 &#x4E3A;&#x5355;&#x9875;&#x5E94;&#x7528;&#x751F;&#x6210; HTML</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-10&#x7BA1;&#x7406;&#x591A;&#x4E2A;&#x5355;&#x9875;&#x5E94;&#x7528;.html">3-10 &#x7BA1;&#x7406;&#x591A;&#x4E2A;&#x5355;&#x9875;&#x5E94;&#x7528;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-11&#x6784;&#x5EFA;&#x540C;&#x6784;&#x5E94;&#x7528;.html">3-11 &#x6784;&#x5EFA;&#x540C;&#x6784;&#x5E94;&#x7528;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-12&#x6784;&#x5EFA;Electron&#x5E94;&#x7528;.html">3-12 &#x6784;&#x5EFA; Electron &#x5E94;&#x7528;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-13&#x6784;&#x5EFA;Npm&#x6A21;&#x5757;.html">3-13 &#x6784;&#x5EFA; Npm &#x6A21;&#x5757;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-14&#x6784;&#x5EFA;&#x79BB;&#x7EBF;&#x5E94;&#x7528;.html">3-14 &#x6784;&#x5EFA;&#x79BB;&#x7EBF;&#x5E94;&#x7528;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-15&#x642D;&#x914D;NpmScript.html">3-15 &#x642D;&#x914D; Npm Script</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-16&#x68C0;&#x67E5;&#x4EE3;&#x7801;.html">3-16 &#x68C0;&#x67E5;&#x4EE3;&#x7801;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-17&#x901A;&#x8FC7;Node.jsAPI&#x542F;&#x52A8;Webpack.html">3-17 &#x901A;&#x8FC7; Node.js API &#x542F;&#x52A8; Webpack</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-18&#x4F7F;&#x7528;WebpackDevMiddleware.html">3-18 &#x4F7F;&#x7528; Webpack Dev Middleware</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-19&#x52A0;&#x8F7D;&#x56FE;&#x7247;.html">3-19 &#x52A0;&#x8F7D;&#x56FE;&#x7247;</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-20&#x52A0;&#x8F7D;SVG.html">3-20 &#x52A0;&#x8F7D;SVG</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-21&#x52A0;&#x8F7D;SourceMap.html">3-21 &#x52A0;&#x8F7D; Source Map</a></li>
<li><a href="3&#x5B9E;&#x6218;/3-22&#x5B9E;&#x6218;&#x603B;&#x7ED3;.html">3-22 &#x5B9E;&#x6218;&#x603B;&#x7ED3;</a></li>
</ul>
<h3 id="&#x7B2C;4&#x7AE0;-&#x4F18;&#x5316;"><a href="4&#x4F18;&#x5316;/">&#x7B2C;4&#x7AE0; &#x4F18;&#x5316;</a></h3>
<ul>
<li><a href="4&#x4F18;&#x5316;/4-1&#x7F29;&#x5C0F;&#x6587;&#x4EF6;&#x641C;&#x7D22;&#x8303;&#x56F4;.html">4-1 &#x7F29;&#x5C0F;&#x6587;&#x4EF6;&#x641C;&#x7D22;&#x8303;&#x56F4;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-2&#x4F7F;&#x7528;DllPlugin.html">4-2 &#x4F7F;&#x7528; DllPlugin</a></li>
<li><a href="4&#x4F18;&#x5316;/4-3&#x4F7F;&#x7528;HappyPack.html">4-3 &#x4F7F;&#x7528; HappyPack</a></li>
<li><a href="4&#x4F18;&#x5316;/4-4&#x4F7F;&#x7528;ParallelUglifyPlugin.html">4-4 &#x4F7F;&#x7528; ParallelUglifyPlugin</a></li>
<li><a href="4&#x4F18;&#x5316;/4-5&#x4F7F;&#x7528;&#x81EA;&#x52A8;&#x5237;&#x65B0;.html">4-5 &#x81EA;&#x52A8;&#x5237;&#x65B0;&#x4E0E;&#x6A21;&#x5757;&#x70ED;&#x66FF;&#x6362;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-6&#x5F00;&#x542F;&#x6A21;&#x5757;&#x70ED;&#x66FF;&#x6362;.html">4-6 &#x5F00;&#x542F;&#x6A21;&#x5757;&#x70ED;&#x66FF;&#x6362;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-7&#x533A;&#x5206;&#x73AF;&#x5883;.html">4-7 &#x533A;&#x5206;&#x73AF;&#x5883;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-8&#x538B;&#x7F29;&#x4EE3;&#x7801;.html">4-8 &#x538B;&#x7F29;&#x4EE3;&#x7801;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-9CDN&#x52A0;&#x901F;.html">4-9 CDN &#x52A0;&#x901F;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-10&#x4F7F;&#x7528;TreeShaking.html">4-10 &#x4F7F;&#x7528; Tree Shaking</a></li>
<li><a href="4&#x4F18;&#x5316;/4-11&#x63D0;&#x53D6;&#x516C;&#x5171;&#x4EE3;&#x7801;.html">4-11 &#x63D0;&#x53D6;&#x516C;&#x5171;&#x4EE3;&#x7801;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-12&#x6309;&#x9700;&#x52A0;&#x8F7D;.html">4-12 &#x6309;&#x9700;&#x52A0;&#x8F7D;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-13&#x4F7F;&#x7528;Prepack.html">4-13 &#x4F7F;&#x7528; Prepack</a></li>
<li><a href="4&#x4F18;&#x5316;/4-14&#x5F00;&#x542F;ScopeHoisting.html">4-14 &#x5F00;&#x542F; Scope Hoisting</a></li>
<li><a href="4&#x4F18;&#x5316;/4-15&#x8F93;&#x51FA;&#x5206;&#x6790;.html">4-15 &#x8F93;&#x51FA;&#x5206;&#x6790;</a></li>
<li><a href="4&#x4F18;&#x5316;/4-16&#x4F18;&#x5316;&#x603B;&#x7ED3;.html">4-16 &#x4F18;&#x5316;&#x603B;&#x7ED3;</a></li>
</ul>
<h3 id="&#x7B2C;5&#x7AE0;-&#x539F;&#x7406;"><a href="5&#x539F;&#x7406;/">&#x7B2C;5&#x7AE0; &#x539F;&#x7406;</a></h3>
<ul>
<li><a href="5&#x539F;&#x7406;/5-1&#x5DE5;&#x4F5C;&#x539F;&#x7406;&#x6982;&#x62EC;.html">5-1 &#x5DE5;&#x4F5C;&#x539F;&#x7406;&#x6982;&#x62EC;</a></li>
<li><a href="5&#x539F;&#x7406;/5-2&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x5206;&#x6790;.html">5-2 &#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x5206;&#x6790;</a></li>
<li><a href="5&#x539F;&#x7406;/5-3&#x7F16;&#x5199;Loader.html">5-3 &#x7F16;&#x5199; Loader</a></li>
<li><a href="5&#x539F;&#x7406;/5-4&#x7F16;&#x5199;Plugin.html">5-4 &#x7F16;&#x5199; Plugin</a></li>
<li><a href="5&#x539F;&#x7406;/5-5&#x8C03;&#x8BD5;Webpack.html">5-5 &#x8C03;&#x8BD5; Webpack</a></li>
<li><a href="5&#x539F;&#x7406;/5-6&#x539F;&#x7406;&#x603B;&#x7ED3;.html">5-6 &#x539F;&#x7406;&#x603B;&#x7ED3;</a></li>
</ul>
<h3 id="&#x9644;&#x5F55;">&#x9644;&#x5F55;</h3>
<ul>
<li><a href="&#x9644;&#x5F55;/&#x5E38;&#x7528;Loaders.html">&#x5E38;&#x7528; Loaders</a></li>
<li><a href="&#x9644;&#x5F55;/&#x5E38;&#x7528;Plugins.html">&#x5E38;&#x7528; Plugins</a></li>
<li><a href="&#x9644;&#x5F55;/&#x5176;&#x5B83;Webpack&#x5B66;&#x4E60;&#x8D44;&#x6E90;.html">&#x5176;&#x5B83; Webpack &#x5B66;&#x4E60;&#x8D44;&#x6E90;</a></li>
</ul>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="前言.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 前言">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"深入浅出 Webpack","level":"1.1","depth":1,"next":{"title":"前言","level":"1.2","depth":1,"path":"前言.md","ref":"前言.md","articles":[]},"dir":"ltr"},"config":{"plugins":["adsense","github-buttons"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"github-buttons":{"buttons":[{"user":"gwuhaolin","type":"follow","size":"small","width":"150"},{"user":"gwuhaolin","repo":"dive-into-webpack","type":"star","size":"small"}]},"sharing":{"facebook":false,"twitter":false,"google":false,"weibo":true,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"adsense":{"client":"ca-pub-9697944574373240","slot":"9319793387","format":"auto","element":".page-inner section","position":"top"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"吴浩麟","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"isbn":"9787121331725","variables":{},"title":"深入浅出 Webpack","language":"zh-hans","gitbook":"*","description":"本书按照入门、配置、实战、优化、原理的路线层层深入,涵盖了 Webpack 的方方面面。对于小白,本书可以作为 Webpack 入门教程,对于老手,本书可以进一步加深你对 Webpack 的理解。"},"file":{"path":"README.md","mtime":"2022-07-24T02:52:42.194Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-07-24T02:53:19.220Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-adsense/plugin.js"></script>
<script src="gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hellohere/dive-into-webpack.git
[email protected]:hellohere/dive-into-webpack.git
hellohere
dive-into-webpack
dive-into-webpack
master

搜索帮助