webpack诞生
It’s a funny story how I started with Webpack. Before getting addicted to JavaScript, I also developed in Java. I tried GWT (Google Web Toolkit) in that time. GWT is a Java-to-JavaScript Compiler, which has a great feature: code-splitting. I liked this feature and missed it in existing JavaScript tooling. I made a pull request to an existing module bundler, but it did not go through. Webpack was born.
为什么需要构建?
1. 开发分工变化
单页面的兴起,前端越来越复杂,在业务代码中会越来越多,架构也越来越复杂。
2.框架演变
js库(js库解决不同的兼容性,Jquery,js方法的补充)
mvc(应用变化,模块化,逻辑分层)
mv(*)(React,Angular,Vue)
框架推崇模块化,es6,需要在构建的过程需要打包。
3.语言的发展
html
css
浏览器
js版本变化(es版本,typescript)
4.环境变化
(node.js borwer, react-native)
5. 社区
(从npm包管理器引入第三方资源)
6. 构建工具的变化
随着node的发展,构建工具的兴起
框架去中心化,不再追求大而全,开发复杂化,语言编译化 ,开发模块化
