edp icon indicating copy to clipboard operation
edp copied to clipboard

[edp-build]加一个将text资源内联到js的处理器

Open otakustay opened this issue 9 years ago • 2 comments

希望可以将这样的代码:

var content = require('text!./content.tpl.html');

经过处理后变成

var content = '...content.tpl.html的内容...';

考虑到我们还有基于tpl!插件进行处理的TplMerge处理器,因此我们是否可以抽象一套基于AMD插件的处理逻辑出来,比如检测指定名称插件的require,找对应的资源文件读取内容等

otakustay avatar Oct 21 '15 09:10 otakustay

使用万能的 StringReplacer 吧?

leeight avatar Oct 21 '15 10:10 leeight

那个模块路径的计算好像没法搞……

在 2015年10月21日,下午6:04,leeight [email protected] 写道:

使用万能的 StringReplacer 吧?

— Reply to this email directly or view it on GitHub.

otakustay avatar Oct 21 '15 10:10 otakustay