emaphp / underscore-template-loader

A Underscore and Lodash template loader for Webpack
MIT License
104 stars 24 forks source link

underscore-template-loader in custom jest transformer #32

Open dhaval-lila opened 6 years ago

dhaval-lila commented 6 years ago

I am writing custom jest transfomer for ejs templates something like this

const temp = require('underscore-template-loader');
module.exports = {
  process(src) {
   return temp(src);
  },
};

i am getting error something like this TypeError: this.async is not a function . what is the correct way to write transformer using underscore-template-loader?

khaled-nabil commented 4 years ago

@dhaval-lila have you been able to figure out the cause for this issue or a workaround? I am currently running into the same problem as well.