Configuration of webpack dynamic entry

my entry is read through file and is an asynchronous operation. I don"t know how to introduce it into webpack.config now. The
code thanks everyone

at this address https://github.com/chenqing20.
.
Feb.24,2022

you can try this by first exposing the readFile method directly in config.js

module.exports = readFile;

modify webpack.config.js at the same time

var readFile = require("./config");
var path = require("path");
var distPath = path.join(__dirname, "/dist/");

module.exports = async function() {
  var entry = await readFile();
  return {
    entry: entry,
    output: {
      filename: "[name].js",
      path: distPath
    },
    module: {
      rules: [
        {
          test: /\.m?js$/,
          exclude: /(node_modules)/,
          use: {
            loader: "babel-loader",
            options: {
              presets: ["@babel/preset-env"]
            }
          }
        }
      ]
    }
  };
};

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4757c-44c36.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4757c-44c36.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?