UNPKG

penthouse

Version:

Generate critical path CSS for web pages

17 lines (15 loc) 441 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = insertStyles; // NOTE: duplicated from insertStyles function inside replacePageCss.js, // as not possible to re-use in between function insertStyles({ styles }) { var styleTag = document.createElement('style'); styleTag.type = 'text/css'; styleTag.appendChild(document.createTextNode(styles)); document.head.appendChild(styleTag); }