nippur72 / ifdef-loader

Webpack loader for JavaScript/TypeScript conditional compilation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Html preprocecor

RESTOMAX opened this issue · comments

Hi,

Is-it possible to preprocessing html files?

Exemple:

<!--#if dev-->
<div>DEVELOPMENT VERSION</div>
<!--#endif-->

Thanks for your job :)

no, at the moment it's not possible because it is expecting to work with javascript files.

To make it work with .html files, a whole different preprocessor is needed. It should be rather easy to write one, using the cheerio library. Perhaps making another different loader out of it.