Webpack plugin for preprocessor support
This project is my first attempt at making a webpack loader and is based on the webpack-strip-block project by jballant webpack-strip-block
###Example:
funcionfoo(){/*#if dev*/letbar='dev';/*#elif stage&&test*/letbar='stage-test';/*#elif stage||test*/letbar='stage-or-test';/*#else*/letbar='prod';/*#endif*//*#if !dev*/bar+='!dev';/*#endif*//*#if cond1&&cond2||cond3 */// <-- combinations of && and || operators are not supported/*#endif*/console.log(bar);}<!--#if dev||stage--><div>DEVELOPMENT VERSION</div><!--#endif-->webpack.config:
{module: {loaders: [{test: /\.(js|htm(l?))$/,loader: "webpack-preprocessor?definitions=['stage,test']"}]}};