UNPKG

html-render-webpack-plugin

Version:

webpack plugin for rendering static HTML in a multi-config webpack build

21 lines (17 loc) 557 B
const path = require("path"); const { merge } = require("webpack-merge"); const defaultConfig = require("./webpack.default.config"); const HtmlRenderPlugin = require("../../../src").default; const renderDirectory = path.join(process.cwd(), "dist", "render"); const htmlRenderPlugin = new HtmlRenderPlugin({ mapStatsToParams: () => ({}), renderDirectory, }); module.exports = [ merge(defaultConfig[0], { plugins: [htmlRenderPlugin.statsCollectorPlugin], }), merge(defaultConfig[1], { plugins: [htmlRenderPlugin.rendererPlugin], }), ];