UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

20 lines (18 loc) 686 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs_1 = require("fs"); exports.default = (targetOptions, indexHtml) => { const i = indexHtml.indexOf('</body>'); const bundlePath = '../../dist/packages/shell/bundle'; const files = (0, fs_1.readdirSync)(bundlePath); let insert = ''; for (const file of files) { if (file.indexOf('msftsme.') === 0 || file.indexOf('vendor.') === 0) { insert += `<script src="${file}" defer></script>`; } } return `${indexHtml.slice(0, i)} ${insert} ${indexHtml.slice(i)}`; }; //# sourceMappingURL=shell.index-html.transform.js.map