razzle-examples-with-elm

3.0.0 • Public • Published

Razzle Elm Example

How to use

Download the example or clone the whole project:

curl https://codeload.github.com/jaredpalmer/razzle/tar.gz/master | tar -xz --strip=2 razzle-master/examples/with-elm
cd with-elm

Install it and run:

yarn install
yarn start

Idea behind the example

This is a basic example of how to use Razzle and Elm, it uses:

src/client.js contains all the js code required to load Elm, you can configure Elm ports here src/server.js the server side, here call elm-static-html-lib with the respective module to render the view


If you want to activate the Elm debug mode or other tooling and debug utilites of Elm edit razzle.config.js:

{
    loader: 'elm-webpack-loader',
    options: { //Edit here
        verbose: true,
        warn: true,
        pathToMake: require('elm/platform').executablePaths['elm-make'],
        forceWatch: true
    }
}

As of Razzle 2.0, you can now use razzle-plugin-elm instead of adding the webpack loaders on your own.

Readme

Keywords

none

Package Sidebar

Install

npm i razzle-examples-with-elm

Weekly Downloads

1

Version

3.0.0

License

MIT

Unpacked Size

40.2 kB

Total Files

14

Last publish

Collaborators

  • jaredpalmer