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中plugin和loader的区别 #21

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

webpack中plugin和loader的区别 #21

lxinr opened this issue Apr 25, 2019 · 0 comments

Comments

@lxinr
Copy link
Owner

lxinr commented Apr 25, 2019

  • loader:加载器,在module.rules中配置,用于对模块源码的转换,loader可以使你在 import或"加载"模块时预处理文件,包括对其他语言、图像、css等类型的处理

  • plugin:插件,用于扩展webpack的功能,目的在于解决 loader无法实现的其他事,比如打包优化、代码压缩、模块提取等

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