jqtempl-loader
v0.1.4
Published
jquery template loader module for webpack
Downloads
7
Readme
JQuery-Template Webpack loader
Install with npm
:
npm install --save-dev jqtempl-loader
Webpack config
module.exports = {
...
module: {
loaders: [
{ test: /\.html/, loader: 'jqtempl-loader'}
]
},
...
};
That make jquery template file with the name *.html. You can make other name for template files and change the test pattern
In Code
var buttonTmpl = require('./tpl/tplButton.html');
//invoke
buttonTmpl($, {
'data': data
});