-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack编译流程漫谈 #1
Comments
点赞,介绍的很基础。谢谢 |
@ckmilse 有帮助就好啊!关于webpack的hash、chunk这块,这篇文章还没有完全覆盖,它们也是webpack中非常重要的一块 |
唔……插件理解有误 |
@renaesop 愿闻其详,松神 |
很赞.. |
赞 |
赞,清晰明了 |
process.cwd()这个函数是干啥的呀? |
process.cwd()表示返回运行当前脚本的工作目录的路径 |
赞 |
mark |
赞 |
nice |
不cuo |
干脆利索 |
Open
相关讲的比较细的资料: https://juejin.im/entry/5b0e3eba5188251534379615 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
webpack编译流程漫谈
前言
webpack在开发者社区的反馈
webpack整体架构(以webpack.config主要部分进行划分)
entry:
定义整个编译过程的起点output:
定义整个编译过程的终点module:
定义模块module
的处理方式plugin
对编译完成后的内容进行二度加工resolve.alias
定义模块的别名webpack的核心
module
webpack是如何处理如上webpack.config文件解析
1. 确定webpack编译上下文context
2.entry和output 确定webpack的编译起点和终点
3. module.loaders 和 module.test 确定模块预编译处理方式
4. plugin阶段贯穿于webpack的整个编译流程,一般用来做一些优化操作。
5.resolve.alias的作用就是对module模块提供别名,并没有什么特殊的。
【副作用】 webpack编译过程中的电脑卡慢?
【webpack编译对象compilation】 webpack将编译结果导出到output是怎么做到的
总结
webpack官方文档
The text was updated successfully, but these errors were encountered: