Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ronanyeah/elm-reloader
Live reload Webpack plugin for Elm.
https://github.com/ronanyeah/elm-reloader
development-tools elm live-reload webpack webpack-loader
Last synced: 3 months ago
JSON representation
Live reload Webpack plugin for Elm.
- Host: GitHub
- URL: https://github.com/ronanyeah/elm-reloader
- Owner: ronanyeah
- License: mit
- Created: 2022-06-21T01:35:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T01:53:24.000Z (over 2 years ago)
- Last Synced: 2024-09-30T05:22:33.529Z (4 months ago)
- Topics: development-tools, elm, live-reload, webpack, webpack-loader
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/elm-reloader
- Size: 11.7 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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](https://github.com/elm-community/elm-webpack-loader). If you're looking for something that doesn't require Webpack, see [elm-hot](https://github.com/klazuka/elm-hot).
## Installation
```bash
$ npm install --save-dev elm-reloader
```You will also need to install [elm-webpack-loader](https://github.com/elm-community/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:
```javascript
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](https://github.com/ronanyeah/elm-webpack).