antwarjs / antwar

A static site generator built with React and Webpack.
https://antwar.js.org/
MIT License
460 stars 35 forks source link

Use template-literal instead of EJS #135

Open Drulac opened 6 years ago

Drulac commented 6 years ago

Template Literal is fastest, smallest and simplest template engine, because it use JS's literal template feature.

It's 55 times faster than EJS, and it also use less CPU and RAM ressources, so it may be a good idea to use it instead of EJS 😀

bebraw commented 6 years ago

Hi,

Currently antwar is coupled with html-webpack-plugin. It's possible to replace the template engine there. The problem is that I don't expose the plugin enough at the moment.

I think it would be a good idea to refactor this integration so you can plug in template-literal. We should agree on a design first.

bebraw commented 6 years ago

I wrote mini-html-webpack-plugin. It uses literals as you suggested.

I guess the next step would be to figure out a nice way to integrate but it's a good change to make.