UNPKG

quickwis-tmod

Version:

artTemplate loader module for webpack

17 lines (11 loc) 422 B
'use strict'; var Tmod = require('./src/tmod'); module.exports = function (content) { this.cacheable && this.cacheable(); // var options = this.query ? JSON.parse(this.query.replace(/\?/g, "")) : {}; var tmod = new Tmod('./', {}) var path = this.resourcePath.replace(/\\/g, "/"); var output = tmod.compile(path); if (!output) throw new Error(output); ; return output; }