handlebars-webpack-plugin
handlebars-webpack-plugin copied to clipboard
Exclude directories in entry piont
At this moment I have all pages in src/pages dir
entry: path.join(dirPages, '**', '*.hbs'),
but I need to move everything into one src dir which will contain assets, helpers and partials too. Therefore I need to exclude some dirs from entry. I tried glob pattern which wasn't working
entry: glob.sync('./src/!(assets|data|helpers|partials)/**/*.hbs'),
Haven't found any info how to use glob
with handlebars-webpack-plugin.
Hi 5ulo.
the value on entry
will be passed through glob within the plugin. Something like the following should work:
entry: './src/!(assets|data|helpers|partials)/**/*.hbs',
Thanks for the clue.. this is what I was looking for (includes also files in src's root dir:
entry: './src/!(assets|data|helpers|partials){,**/}*.hbs',