Why the rules of chunkFilename in webpack4 affect filename?

< H2 > question: < / H2 >

I configured both filename and chunkFilename,

  entry: {
    index: "./src/index.js",
    home:"./src/home.js"
  },
 output: {
    filename: "[name].[chunkhash:8].js",
    chunkFilename: "[name].bundle.js",
    path: resolve("dist")
  },

at the same time, I configured

  optimization:{
    runtimeChunk:true
  },

the names of the two entry files packaged at this time contain the word bundle. The question is:
chunkFilename should only affect the naming rules of non-entry chunk. Why does it affect the naming rules of entry files?

< H2 > Test: < / H2 >

after I remove the runtimeChunk:true configuration, the naming convention of the entry file is normal, and the packaged file name does not have the word bundle.

< H2 > guess: < / H2 >

does the configuration runtimeChunk:true affect naming?

< H2 > webpack.config.js < / H2 >
{
  "name": "webpack-v4",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "dev": "set NODE_ENV=development&&webpack-dev-server --color --inline --progress --config webpack.config.js",
    "build": "webpack --config webpack.config.js"
  },
  "devDependencies": {
    "clean-webpack-plugin": "^0.1.19",
    "webpack": "^4.16.5",
    "webpack-cli": "^3.1.0",
    "webpack-dev-server": "^3.1.5"
  },
  "dependencies": {
    "bundle-loader": "^0.5.6",
    "lodash": "^4.17.10"
  }
}
Aug.05,2021

have you solved it? I also encountered this problem


has the landlord solved it?

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-1b35fb0-2bfe6.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-1b35fb0-2bfe6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?