Skip to content

Webpack loader for incremental-bars, an Handlebars backend for incremental-dom

Notifications You must be signed in to change notification settings

blikblum/incremental-bars-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

incremental-bars loader

Webpack loader for incremental-bars, an Handlebars backend for incremental-dom

Configuration

//webpack.config.js
  ...
  module: {
    rules: [
      ...
      { 
        test: /\.handlebars$/, 
        use: ['babel-loader', 'incremental-bars-loader'] 
      }
    ]
  },
  // workaround to a webpack issue: https://github.com/webpack-contrib/css-loader/issues/447
  node: {
    fs: 'empty'
  }

Usage

import template from 'mytemplate.handlebars'
import IncrementalDOM from 'incremental-dom'

let el = document.getElementById('to-render')
let data = {name: 'Hello', message: 'world'}

IncrementalDOM.patch(el, template, data)

See a complete application example

About

Webpack loader for incremental-bars, an Handlebars backend for incremental-dom

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published