Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 879 Bytes

README.md

File metadata and controls

48 lines (36 loc) · 879 Bytes

elixirscript webpack loader

Requirements

  • Erlang installed

Usage

Documentation: Using loaders

Recommended configuration

{
  module: {
    rules: [
      {
        test: /\.ex$/,
        exclude: /(node_modules|bower_components)/,
        loader: "elixirscript-loader",
        options: {
          inputFolder: "./app/elixirscript",
          jsModules: [
            ["React", "react"], 
            ["ReactDOM", "react-dom"]
          ]
        }
      }
    ]
  }
}

Options

  • inputFolder: (required) The path to your elixirscript files
  • jsModules: (optional) A list of JavaScript modules used

Code

import Elixir from "path/to/elixirscript/entry/path/app.ex";
Elixir.start(Elixir.App, []);

License

MIT (http://www.opensource.org/licenses/mit-license.php)