webpack 中文参考,webpack.config.js详细的介绍 参考自survivejs的webpack博客,并不是原文翻译,更多是学习笔记形式,但是保留原文的代码部分。 不够详尽的地方可以阅读原文,原英文版连接。 前言(略) Webpack比较(略) 开发中的Webpack 开始 拆分配置文件 浏览器自动刷新 刷新CSS 开启Sourcemaps 生产环境的Webpack 压缩构建 设置环境变量 拆分生成文件 为文件名添加hash 清除生成文件夹 拆分CSS文件 清除未使用CSS 分析构建静态文件 部署Github-Pages 加载资源 格式化支持 Loader定义 样式loader 图片loader 字体loader 高级 理解Chuncks webpack语法分析 编写package 以下2节请参考原文 自定义loader 配置react