ractive-bin-loader
This webpack loader allows you to write Ractive.js components and have them available pre-compiled for the rest of your webpack build.
Installation
npm install --save-dev ractive-bin-loader
Usage
Merge this into your webpack.config.js
:
module: loaders: // you can scope this by directory or using another extension // using .ractive.html for your components gives you good // syntax highlighting with most editors test: /\.ractive\.html$/ loaders: 'ractive-bin-loader'
Then you can write components like this:
<!-- you can also use a link tag with an external stylesheet --> <!-- any html is gathered up to be parsed and injected wherever $TEMPLATE is found in the script --> {{>myPartial}} Go