UNPKG

@alitajs/umi-presets-alita

Version:
48 lines (38 loc) 795 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _fs() { const data = require("fs"); _fs = function _fs() { return data; }; return data; } function _path() { const data = require("path"); _path = function _path() { return data; }; return data; } var _default = api => { // 生成临时文件 api.onGenerateFiles({ fn() { const exportsTpl = (0, _fs().readFileSync)((0, _path().join)(__dirname, 'historyAdapater.tpl'), 'utf-8'); api.writeTmpFile({ path: 'historyAdapater.ts', content: exportsTpl }); } }); api.addUmiExports(() => { return [{ exportAll: true, source: '../historyAdapater' }]; }); }; exports.default = _default;