Compiles CanJS Stache templates with can-view-parser and allows to load them with webpack
You can install the library using NPM:
npm install can-stache-loader --save-dev
or by Yarn:
yarn add can-stache-loader
webpack.config.js
{
module: {
rules: [
{
test: /\.stache$/,
use: {
loader: 'can-stache-loader'
}
}
]
}
}
Import stache templates in your CanJS project
import tpl from './template.stache';
const html = tpl({
foo: 'bar'
});
This library works fine with CanJS version 4.0.0+ and webpack 2.0.0+.