木易杨-Daily-148

第 148 题:webpack 中 loader 和 plugin 的区别是什么

While loaders are used to transform certain types of modules, plugins can be leveraged to perform a wider range of tasks like bundle optimization, asset management and injection of environment variables.

loaders是被用来转换一定类型的模块,而plugins被用来最优化操作尽可能更大范围的任务,像打包优化,静态资源管理和环境变量的注入等。