1.1.0 • Published 8 years ago

elm-simple-loader v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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
  }
[...]
1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago