node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

jsmart-loader

jSmart loader for webpack

jSmart loader lets you use jSmart(Smarty template javascript engine) and Webpack together, including auto-loading partials.

Build Status npm version David David npm

Install

npm install jsmart-loader --save-dev

Usage

webpack 2.x and webpack 3.x

module: {
    rules: [ {
        test: /\.tpl|\.smarty$/,
        loader: 'jsmart-loader'
    } ]
}

webpack 1.x

module: {
    loaders: [ {
        test: /\.tpl|\.smarty$/,
        loader: 'jsmart'
    } ]
}
var template = require('./template.smarty');
var html = template({ name: 'world' });

Documentation: Using loaders.