Closed woshi82 closed 6 years ago
add fis.on('plugin:relative:fetchContent', onFetchRelativeFile);
// 在自定义的插件中 …… file.cache.addDeps(depFileRealPath); content = fis.compile.partial(content, temFile, { ext: 'html' }); // 触发相对路径调整 var relativeToFile = relativeTo ? fis.project.lookup(relativeTo).file : file; temFile.relativeBody = content; var message = { file: temFile, relativeTo: relativeToFile }; fis.emit('plugin:relative:fetchContent',message) message.content && (content = message.content); ……
add fis.on('plugin:relative:fetchContent', onFetchRelativeFile);