npm.io
1.0.4 • Published 8 years ago

emuto-loader

Licence
MIT
Version
1.0.4
Deps
0
Size
352 kB
Vulns
0
Weekly
0

emuto-loader

An emuto loader for webpack.

Setup

You need to install emuto and emuto-loader:

Using yarn

yarn add --dev emuto emuto-loader

Using npm

npm install --save-dev emuto emuto-loader

You need to modify your webpack config:

// webpack.config.js
module.exports = {
  ...
  module: {
    rules: [{
      test: /\.eq$/,
      loader: 'emuto-loader' // compiles emuto to JavaScript
    }]
  }
};

You'll now be able to import emuto scripts:

// index.js
import GreetUser from './greeting.eq'

console.log(GreetUser({user: "John"}))