Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger and auto-recompile on file change #27

Closed
pienter-tech opened this issue Dec 7, 2018 · 5 comments · Fixed by #32
Closed

Debugger and auto-recompile on file change #27

pienter-tech opened this issue Dec 7, 2018 · 5 comments · Fixed by #32

Comments

@pienter-tech
Copy link

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

  • When using npm start the debugger should be on by default.
    I added this:
      use: [{
            loader: 'elm-webpack-loader',
            options: {
              verbose: true,
              debug: true,
            },
          }],
    
    to the webpack.config.js but when I want to build I always have to remember to change the options.
  • Right now when I update the elm code I always have to stop and rerun npm start
    it would be nice if there was a file watcher to recompile automatically.
@ghost
Copy link

ghost commented Jan 14, 2019

@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
Copy link

ghost commented Jan 14, 2019

This is only true for --serverless config

@Maxim-Filimonov
Copy link

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

@rogeriochaves
Copy link
Owner

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants