Git Product home page Git Product logo

webpack4-learn's Introduction

项目说明

此项目总共 24 小节,前 15 节基于 Webpack4 渐进式教程 为基础,加上自己的实践和理解得出,感谢 心谭 😄

Webpack4 渐进式教程 的基础上升级:

  • 使用 babel7
  • 配置 .browserslistrc 文件
  • 使用 mini-css-extract-plugin 替代 extract-text-webpack-plugin
  • 使用 optimize-css-assets-webpack-plugin 压缩 css
  • 使用 postcsscss 加上各个浏览器前缀
  • 使用 image-webpack-loader 处理图片

随后的章节以 mooc手把手带你掌握新版 Webpack4.0 整理的学习笔记,感谢 DellLee 老师 😄

目录:

  1. 搭建项目并打包 JS 文件
  2. 生产和开发模式
  3. 覆盖默认 entry/output
  4. 用 Babel 7 转译 ES6
  5. Code Splitting
  6. Lazy Loading、Prefetching
  7. 自动生成 HTML 文件
  8. 处理 CSS/SCSS 文件
  9. JS Tree Shaking
  10. CSS Tree Shaking
  11. 图片处理汇总
  12. 字体文件处理
  13. 处理第三方 js 库
  14. 开发模式与 webpack-dev-server
  15. 开发模式和生产模式・实战
  16. 打包自定义函数库
  17. PWA 配置
  18. TypeScript 配置
  19. Eslint 配置
  20. 使用 DLLPlugin 加快打包速度
  21. 多页面打包配置
  22. 编写 loader
  23. 编写 plugin
  24. 编写 Bundle

环境如下:

OS: 「win10」
node: 「10.5.0」
npm: 「6.1.0」
webpack: 「4.29.6」
webpack-cli: 「3.2.3」

每一个章节对应一个 demo 👉 配套的文档地址

有错误请提 issue

觉得有帮助的小伙伴不妨点个 star~

关于我

webpack4-learn's People

Contributors

itxiaohao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

webpack4-learn's Issues

关于代码切割

你好,我想请问一下demo5里面,如果a.js跟b.js,在index.js,不是异步引进而是直接import './a.js',这是common.js,是切割不出去的,请问有什么办法解决吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.