itgalaxy / nunjucks-webpack-plugin

A webpack plugin for nunjucks.
MIT License
27 stars 12 forks source link

Multiple templates #1

Closed HamedFathi closed 7 years ago

HamedFathi commented 7 years ago

Hi

I have this

const njks = path.join(__dirname, 'Nunjucks', '**', '*.@(njk|nunjucks)');
const njkFiles = glob.sync(njks);

How to configure your plugin with multiple .njk templates ? your snippet code have one .njk and one template`s result.

alexander-akait commented 7 years ago

@HamedFathi you can use template:[{from: 'foo.njk', to: 'bar'}, {from: 'bar.njk', to: 'foo'}] options for multiple templates

HamedFathi commented 7 years ago

@evilebottnawi

Thanks yes it works, please add this tip to your README.md.