rogeriochaves / spades

Start an Elm SPA ready to the real world
302 stars 19 forks source link

Debugger and auto-recompile on file change #27

Closed pienter-tech closed 5 years ago

pienter-tech commented 5 years ago

Hello, For starters: I really love the generators! But I'm missing two things in this project:

ghost commented 5 years ago

@pienter-tech you probably can just npm i --dev elm-hot-webpack-loader and replace loader with

{
  test: /\.elm$/,
  exclude: [/elm-stuff/, /node_modules/],
  use: [
    { loader: "elm-hot-webpack-loader" },
    {
      loader: "elm-webpack-loader",
      options: {
        cwd: __dirname,
        // debug: true,
        pathToElm: "node_modules/.bin/elm"
      }
    }
  ]
}
ghost commented 5 years ago

This is only true for --serverless config

Maxim-Filimonov commented 5 years ago

@tigp is it possible to get HMR without --serverless config? I'd like to get both SSR and HMR

rogeriochaves commented 5 years ago

sorry for the looong delay, I've fixed to now recompile also the version with a server on #32, it's not hot though, if anybody wants to work on that feel free, I'll open another issue for that: #33

rogeriochaves commented 5 years ago

@Maxim-Filimonov there is the webpack-hot-middleware to use on the server, but I haven't had time to play with it yet