Wondering what’s next for npm?Check out our public roadmap! »

    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' },
      ]
    };

    Install

    npm i wow-erb-loader

    DownloadsWeekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • avatar