philicevic / mix-html-builder

A quick laravel mix extension to build up html templates from partials and layouts.
MIT License
19 stars 8 forks source link

I cannot render multiple html files #25

Closed namdaik closed 4 years ago

namdaik commented 4 years ago

image I want to create two html files but only the last function will render

namdaik commented 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;
}`
namdaik commented 4 years ago

``