Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created January 12, 2022 05:07
Show Gist options
  • Save YonatanKra/99ad52ccd306510f7f2972dcba5294b5 to your computer and use it in GitHub Desktop.
Save YonatanKra/99ad52ccd306510f7f2972dcba5294b5 to your computer and use it in GitHub Desktop.
const htmlGenerators = listOfComponents.reduce((entries, componentName) => {
entries.push(new HtmlWebpackPlugin({
inject: true,
chunks: [componentName],
filename: `${componentName}.html`
}));
return entries;
}, []);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment