Socket
Socket
Sign inDemoInstall

elm-reloader

Package Overview
Dependencies
33
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    elm-reloader

Webpack loader providing hot code swapping for Elm


Version published
Weekly downloads
697
increased by20.59%
Maintainers
1
Install size
747 kB
Created
Weekly downloads
 

Readme

Source

elm-reloader

Hot code swapping support for Elm 0.19. This automatically reloads your code in the browser after a change, while preserving your current app state.

This package provides a Webpack loader that can be used in conjunction with elm-webpack-loader. If you're looking for something that doesn't require Webpack, see elm-hot.

Installation

$ npm install --save-dev elm-reloader

You will also need to install elm-webpack-loader, if you haven't already.

Usage

Assuming that you're already using elm-webpack-loader, just add { loader: 'elm-reloader' } immediately before elm-webpack-loader in the use array.

It should look something like this:

module.exports = {
    module: {
        rules: [
            {
                test: /\.elm$/,
                exclude: [/elm-stuff/, /node_modules/],

                use: [
                    { loader: 'elm-reloader' },
                    {
                        loader: 'elm-webpack-loader',
                        options: {
                            cwd: __dirname
                        }
                    }
                ]
            }
        ]
    }
}

Example

Check out the example app.

Keywords

FAQs

Last updated on 21 Jun 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc