UNPKG

vite-plugin-react18-pages

Version:

<p> <a href="https://www.npmjs.com/package/vite-plugin-react-pages" target="_blank" rel="noopener"><img src="https://img.shields.io/npm/v/vite-plugin-react-pages.svg" alt="npm package" /></a> </p>

13 lines 426 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.injectHTMLTag = void 0; const bodyInjectRE = /<\/body>/; function injectHTMLTag(html, tagHtml) { if (bodyInjectRE.test(html)) { return html.replace(bodyInjectRE, `${tagHtml}\n$&`); } // if no body, append return html + `\n` + tagHtml; } exports.injectHTMLTag = injectHTMLTag; //# sourceMappingURL=injectHTMLTag.js.map