https://github.com/sectore/purescript-webpack-vanilla-hmr
PureScript + webpack + vanilla HMR
https://github.com/sectore/purescript-webpack-vanilla-hmr
hmr purescript webpack
Last synced: 5 months ago
JSON representation
PureScript + webpack + vanilla HMR
- Host: GitHub
- URL: https://github.com/sectore/purescript-webpack-vanilla-hmr
- Owner: sectore
- License: mit
- Created: 2016-03-27T20:29:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-12T11:53:38.000Z (over 7 years ago)
- Last Synced: 2025-04-07T16:51:49.584Z (6 months ago)
- Topics: hmr, purescript, webpack
- Language: JavaScript
- Size: 1.42 MB
- Stars: 27
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# purescript-webpack-vanilla-hmr
Simple + fast build of **[PureScript](purescript.org)** with **[Webpack](https://webpack.js.org/)** and **[Hot Module Replacement (HMR)](https://webpack.js.org/guides/hot-module-replacement/)**. No [Pulp](https://github.com/bodil/pulp), no [Gulp](http://gulpjs.com/) or anything else - just [webpack](https://webpack.github.io/).

## Why?
> "I strongly suggest you to consider using vanilla HMR API instead of React Hot Loader, React Transform, or other similar projects. It’s just so much simpler—at least, it is today."
_Quote by Dan Abranov (Creator of [Redux](redux.js.org), [React Hot Loader](https://github.com/gaearon/react-hot-loader) etc.)_
Why not the using the same stuff for building PureScript application today?
## Do I need this to run `Pux` with `HMR`?
To demonstrate the feature of `HMR` [the example app](./src/App.purs) uses [`Pux`](https://github.com/alexmingoia/purescript-pux) under the hood. However, Pux's `starter-app` [has already merged](https://github.com/alexmingoia/pux-starter-app/pull/5) the HMR solution from here. So you don't need to implement this `HMR` _thing_ into your Pux app.
## Installation
It's recommended to use [yarn](https://yarnpkg.com/)
```bash
yarn install
yarn start
```Open http://localhost:3000/
## Acknowledge
- Documentation of webpack: ["Hot Module Replacement" (HMR)](https://webpack.github.io/docs/hot-module-replacement.html)
- ["Hot Reloading in React or, an Ode to Accidental Complexity"](https://medium.com/@dan_abramov/hot-reloading-in-react-1140438583bf#.vnlkto5p1) by Dan Abramov
- Redux PR 1455 ["RFC: remove React Transform from examples"](https://github.com/reactjs/redux/pull/1455)
- [purs-loader](https://github.com/ethul/purs-loader), [purescript-webpack-plugin](https://www.npmjs.com/package/purescript-webpack-plugin) and [purescript-webpack-example](https://github.com/ethul/purescript-webpack-example/blob/master/webpack.config.js) by [ethul](https://github.com/ethul)
- [Webpack and React tutorial - Taking the next steps](http://www.christianalfoni.com/articles/2015_10_01_Taking-the-next-step-with-react-and-webpack) by [Christian Alfoni](https://github.com/christianalfoni)
- [An Angular 2 Starter kit featuring Angular 2](https://github.com/AngularClass/angular2-webpack-starter) by [AngularClass](https://github.com/AngularClass)
- Counter Example of [Pux](https://github.com/alexmingoia/purescript-pux), an awesome PureScript FRP interface to React by [Alex Mingoia](https://github.com/alexmingoia)### License
[MIT](./LICENSE)Have fun :) -- Jens Krause -- [jkrause.io](http://jkrause.io)