wow-erb-loader

0.1.0 • Public • Published

wow-erb-loader

Another .erb loader for webpack. May be useful for passing something from rails to js environment.

Inspired by uh-erb-loader.

Key difference is possibility to provide path to rails binary. Files are piped through the ERB via a rails runner call on commandline (see source for more info).

Installation

Install from npm

$ npm install wow-erb-loader --save-dev

Example Webpack configuration

// webpack.config.js
 
module.exports = {
  preLoaders: [
   //assumes rails binary is ./bin/rails
    { test: /\.erb$/, loader: 'wow-erb-loader' },
    //provide custom rails binary path
    { test: /\.erb$/, loader: 'wow-erb-loader?rails=../bin/rails' },
  ]
};

Dependents (0)

Package Sidebar

Install

npm i wow-erb-loader

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • govorov