This repository was archived by the owner on Apr 19, 2026. It is now read-only.
Description Hi!
Properties from "templateParameters" do not appear in html when using "prerender-loader".
Minimal code to reproduce:
webpack.config.js
const path = require ( 'path' ) ;
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
module . exports = {
mode : 'development' ,
context : __dirname ,
entry : {
bundle : './index.js' ,
} ,
output : {
path : path . resolve ( __dirname , 'build' ) ,
} ,
plugins : [
new HtmlWebpackPlugin ( {
filename : `index_.html` ,
template : `!!prerender-loader?string!./index.html` ,
templateParameters : {
injected : 'foo' , // <--------
} ,
} ) ,
] ,
} ;
index.html
<!DOCTYPE html>
< html lang ="en ">
< head >
< meta charset ="UTF-8 ">
< meta property ="x-injected " content ="<%= injected %> ">
</ head >
< body > </ body >
</ html >
html output
<!DOCTYPE html> < html lang ="en "> < head >
< meta charset ="UTF-8 ">
< meta property ="x-injected " content ="<%= injected %> ">
<!-- ^^^^^^^ -->
</ head >
< body >
< div > PRERENDERED CONTENT</ div > < script src ="bundle.js "> </ script > </ body > </ html > ```
Reactions are currently unavailable
Hi!
Properties from "templateParameters" do not appear in html when using "prerender-loader".
Minimal code to reproduce:
webpack.config.jsindex.htmlhtml output