html-render-webpack-plugin
Version:
webpack plugin for rendering static HTML in a multi-config webpack build
18 lines • 735 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const evaluateFromFileSystem_1 = __importDefault(require("./evaluateFromFileSystem"));
module.exports = function createRenderer({ fileName, fileSystem, rootDir, extraGlobals, }) {
if (!fileName) {
throw new Error("Missing filename");
}
if (!fileSystem) {
throw new Error("Missing source");
}
if (!rootDir || typeof rootDir !== "string") {
throw new Error(`Recieved rootDir as ${typeof rootDir}`);
}
return evaluateFromFileSystem_1.default(fileName, fileSystem, rootDir, extraGlobals);
};
//# sourceMappingURL=createRenderer.js.map
;