Files
webpack5-tutorial/docs/base/README.md
2024-10-16 17:02:47 +08:00

24 lines
635 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 前言
## 为什么需要打包工具?
开发时我们会使用框架React、VueES6 模块化语法Less/Sass 等 css 预处理器等语法进行开发。
这样的代码要想在浏览器运行必须经过编译成浏览器能识别的 JS、Css 等语法,才能运行。
所以我们需要打包工具帮我们做完这些事。
除此之外,打包工具还能压缩代码、做兼容性处理、提升代码性能等。
## 有哪些打包工具?
- Grunt
- Gulp
- Parcel
- Webpack
- Rollup
- Vite
- ...
目前市面上最流量的是 Webpack所以我们主要以 Webpack 来介绍使用打包工具