Open ezekielchentnik opened 5 years ago
Hmm - I think it should be there? That gets into one of the weirder issues with DefinePlugin
- it leaks into parent compiler instances, but perhaps it doesn't leak into sibling compilers? If so then there's no way to have that variable exposed to your template.
One option would be to pass a value directly to html-webpack-plugin
via the templateParameters option:
new HtmlWebpackPlugin({
template: '!!prerender-loader!template.html',
templateParameters: {
PRERENDER: true
}
})
thx, I'll give it a try, the 'PRERENDER' provided inside the plugin doesn't seem to be available
IIRC you can use self.PRERENDER
is there a way to access 'PRERENDER' env variable inside a regular template.html?