A
A
Artem2021-10-29 15:02:56
React
Artem, 2021-10-29 15:02:56

Does the page and data refresh happen only once?

In the 'js' file that is exported, I make changes, after which the data is updated. Changing the file again writes a message to the console '[webpack-dev-server] App updated. Recompiling... [webpack-dev-server] Nothing changed.'
Everything in 'index.js' is updated all the time. Could you tell me what could be the reason that I could miss?

const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const webpack = require("webpack");

module.exports = {
  entry: "./js/main.js",
  output: {
    path: path.join(__dirname, "/build"),
    filename: "bundle.js",
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: {
          loader: "babel-loader"
        },
      },
      {
        test: /\.css$/,
        use: ["style-loader", "css-loader"]
      },
    ]
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new HtmlWebpackPlugin({
      template: "./index.html",
      hash: false
    }),
    
  ],
  devtool: 'source-map',
  devServer: {
        historyApiFallback: true,
  },
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question