All Projects → justinwoo → Elm Simple Loader

justinwoo / Elm Simple Loader

Licence: mit
deprecated. this package likely does not work anymore.

Programming Languages

javascript
184084 projects - #8 most used programming language

Elm Simple Loader

npm

A simple Webpack loader for Elm sources. Uses your system Elm installation.

Usage

Add elm-simple-loader to your loaders:

loaders: [
  {
    loader: 'elm-simple-loader',
    test: /\.elm$/,
    exclude: /node_modules/
  }
]

And then in your JS...

import Elm from '../elm/App.elm';
Elm.fullscreen(Elm.App); and whatnot

Enjoy!

Note

When you bring in precompiled files (like if elm.js contains bits that have been built by elm-make), you'll end up getting warnings about how you're using precompiled files. To shut this error up, you can add this to your module config:

[...]
  module: {
    loaders: [...],
    noParse: [/.elm$/] // tells webpack to not parse Elm sources
  }
[...]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].