摘要: 参考 :译文 编写一个loader https://webpack.github.io/docs/loaders.html 按照loader的返回值可以分为两种: 最左loader:这种loader会返回字符串描述的js模块代码,已经是loader的最终处理结果了,这样的字符串会被添加到webpac 阅读全文
posted @ 2017-12-28 17:56 HelloHello233 阅读(1080) 评论(0) 推荐(1) 编辑
摘要: https://doc.webpack-china.org/contribute/writing-a-loader loader是一个导出了函数的node模块,当资源须要被这个loader所转换的时候,这个函数就会被执行,这个函数可以通过this访问loader api。有三种方式来本地开发和测试l 阅读全文
posted @ 2017-12-28 14:15 HelloHello233 阅读(419) 评论(0) 推荐(0) 编辑