Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

ractive-loader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ractive-loader

ractive template loader module for webpack

latest
Source
npmnpm
Version
0.5.6
Version published
Maintainers
1
Created
Source

ractive-loader for webpack

Exports a Ractive template as a compiled template for webpack.

Usage

Documentation: using loaders

Quick start guide

Install this into your project:

$ npm install --save ractive-loader

Make all your .html files compile down to Ractive templates by modifying your webpack.config.js file:

/* webpack.config.js */
module.exports = {
  module: {
    loaders: [
      { test: /\.html$/, loader: 'ractive' }
    ]
  },
  ...
};

Then use your Ractive templates via require():

new Ractive({
  template: require('./mytemplate.html')
});

Alternate usage

You can also use it without modifying your config. Just explicitly call it on your require() call via a prefix:

new Ractive({
  template: require('ractive!./mytemplate.html')
});

Thanks

ractive-loader © 2014+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

Keywords

webpack

FAQs

Package last updated on 19 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts