SudoCat / Nunjucks-Isomorphic-Loader

Nunjucks loader for webpack, supporting both javascript templating and generating static HTML files through the HtmlWebpackPlugin.
MIT License
16 stars 5 forks source link

Hardcoded file extensions #5

Open SudoCat opened 6 years ago

SudoCat commented 6 years ago

Right now, we have the "accepted" file extensions hard coded into the loader.

https://github.com/SudoCat/Nunjucks-Isomorphic-Loader/blob/master/src/node-loader.js#L54

We could instead provide a configuration option to allow users to customise this.

Even cooler would be if we could detect the "test" which has been applied to the loader, and then use this to match the extensions. This would remove the amount of user configuration required, however that could provide more unreliable.