ane-markdown-loader
Version:
avalon 组件库 ane 依赖的文档工具,将 markdown 转为 avalon 组件
13 lines (10 loc) • 411 B
JavaScript
var loaderUtils = require('loader-utils');
var path = require('path');
module.exports = function (source) {
this.cacheable && this.cacheable();
var markdownCompilerPath = path.resolve(__dirname, './compiler.js');
var result = 'module.exports = require(' +
loaderUtils.stringifyRequest(this, '!!ts-loader!' + markdownCompilerPath + '!' + this.resourcePath) +
');';
return result;
}