Skip to content
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中常用的loader和plugin #22

Open
lxinr opened this issue Apr 25, 2019 · 0 comments
Open

webpack中常用的loader和plugin #22

lxinr opened this issue Apr 25, 2019 · 0 comments

Comments

@lxinr
Copy link
Owner

lxinr commented Apr 25, 2019

loader

  • ts-loader:配置将ts编译转换成js,需配合tsconfig.json等使用
  • vue-loader:vue语法转换
  • eslint-loader:对eslint的支持,提供include、options等多个配置项
  • css-loader:加载 CSS,支持模块化、压缩、文件导入等特性
  • sass-loader:将scss文件转换成css
  • image-loader:加载并压缩图片文件

plugin

  • copy-webpack-plugin:文件或文件夹拷贝
  • mini-css-extract-plugin:可用于将组件内的css分开打包
  • html-webpack-plugin:对html文件的处理
  • terser-webpack-plugin:代码压缩,支持对es6+语法的转换
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant