Socket
Book a DemoInstallSign in
Socket

eco-loader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eco-loader

eco loader module for webpack

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

An Eco template loader for webpack

Usage

Inline

var template = require('eco!./template.eco');
// => returns a template function

Configuration

You can also add the loader to your webpack.config.js file.

module.exports = {
  module: {
    loaders: [
      // Files with the .eco extension will use the eco-loader.
      {test: /\.eco$/, loader: 'eco-loader'}
    ]
  },
  resolve: {
    // .eco added to the default extensions.
    extensions: ['', '.webpack.js', '.web.js', '.js', '.eco']
  }
};

After that the template can be loaded without specifying the loader and the .eco extension.

var template = require('./template');
// => returns a template function

License

MIT (http://opensource.org/licenses/MIT)

FAQs

Package last updated on 19 Feb 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