0.5.4 • Published 7 years ago

elm-hot-loader v0.5.4

Weekly downloads
661
License
MIT
Repository
github
Last release
7 years ago

Elm Hot Loader Version

NPM

Hot swapping for Elm module.

This loader injects HMR support code to the Elm module generated by elm-webpack-loader.

Change Log

0.5.0

  • Elm 0.18 support

0.4.0

0.3.3

  • Better elm-lang/websocket support (thanks to @rundis)

0.3.1

  • Don't error when there are no ports (thanks to @glenjamin)

0.3.0

  • Elm 0.17 support
  • swap port and EmptyAction are gone. Enable this loader and it just works.
  • Incoming ports still work after hot swapping

Installation

$ npm install --save elm-webpack-loader elm-hot-loader

Usage

Documentation: Using loaders

In your webpack.config.js file:

module.exports = {
  module: {
    loaders: [{
      test: /\.elm$/,
      exclude: [/elm-stuff/, /node_modules/],
      loader: 'elm-hot!elm-webpack'
    }]
  }
};

If you don't use elm-webpack-loader to compile Elm, just make sure webpack uses elm-hot to load your compiled js file. Add this to your webpack config file:

loaders: [
  // ...
  {
      test: /[YOUR_COMPILED_JS_FILE_NAME_HERE]\.js$/,
      loader: 'elm-hot'
  }
  // ...
]

You should also add the --hot flag when starting webpack.

Dependency

This loader relies on elm-webpack-loader to compile Elm to JS.

Example

You can find an example project at elm-hot-loader-starter.

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.3.7

8 years ago

0.4.0

8 years ago

0.3.6

8 years ago

0.3.5

8 years ago

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago