W
W
Wasya UK2018-08-19 16:34:27
webpack
Wasya UK, 2018-08-19 16:34:27

Why is hot reload not working?

I seem to be doing everything right, but when changing files, the page does not reload. What could be the problem?

devServer: {
    contentBase: path.resolve(__dirname, './dist'),
    compress: true,
    port: 5000,
    hot: true,
    index: 'frontpage.html',
    open: true,
    overlay: {
      warnings: true,
      errors: true
    },
    inline: true
  }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Egorov, 2018-08-19
@dmc1989

In output specify the following ->

output: {
        publicPath: '/dist/',
        // ...
},

And remove contentBases and hot (true by default). And add historyApiFallbacksomething like this ->
devServer: {
        historyApiFallback: true,
        compress: true,
        port: 5000,
        index: 'frontpage.html',
        open: true,
        inline: true,
        overlay: true
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question