Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created January 12, 2022 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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