Closed namdaik closed 4 years ago
`webpackPlugins() { var Plugins = []; if (Array.isArray(this.htmlRoot)) { this.htmlRoot.forEach(function(htmlRoot) { var filename = htmlRoot.substring(htmlRoot.lastIndexOf('/') + 1); Plugins.push(new HtmlWebpackPlugin({ filename: this.output + '/' + filename, template: htmlRoot, inject: this.inject })); }, this) } else { var filename = this.htmlRoot.substring(this.htmlRoot.lastIndexOf('/') + 1); Plugins.push( new HtmlWebpackPlugin({ filename: this.output + '/' + filename, template: this.htmlRoot, inject: this.inject }) ); }
return Plugins;
}`
``
I want to create two html files but only the last function will render