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?
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.
does the configuration runtimeChunk:true
affect naming?
{
"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"
}
}