tr1s / tris-webpack-boilerplate

A Webpack boilerplate for static websites that has all the necessary modern tools and optimizations built-in. Score a perfect 10/10 on performance.
https://twbp.tris.codes/
MIT License
1.02k stars 97 forks source link

Using Nunjuck for create stati website with multiple pages #16

Closed baglio closed 5 years ago

baglio commented 5 years ago

Hello, there,

I came across this fantastic boilerplate, and I'd like to use it for my future projects. I've previously used some pre-made webpack kickstarters, but to be honest I've never dug inside the config files.

I'd like to use nunjuck as my template engine in order to output several .html files to create static websites. I used Blendid, that didn't require to manually import new .html files inside the entry js file. Is it possibile to achieve something like this?

Thank you.

AndreaPontrandolfo commented 5 years ago

I'm in the same boat. I was using Blendid but i want to switch to this fantastic boilerplate. But Blendid used Nunjucks by default and now my projects are written in Nunjucks. The problem is, apparently html-webpack-plugin doesn't support nunjucks?. Or am i misunderstanding something?

tr1s commented 5 years ago

@baglio @AndreaPontrandolfo html-webpack-plugin doesn't have nunchucks listed as supported, but it looks like some people may have figured it out. Give this a shot!

ogonkov commented 4 years ago

Little self promotion: as alternative simple-nunjucks-loader could be used.