-
-
Notifications
You must be signed in to change notification settings - Fork 667
Closed
Description
What is the current behavior?
webpack.config.js
module.exports = {
mode: 'development',
entry: {
index: './src/entry.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].bundle.js',
},
plugins: [
new CleanWebpackPlugin()
]
}below is project Directory Structure
├── index.js
├── package.json
├── src
│ ├── a.js
│ └── entry.js
└── webpack.config.js
when running npx webpack, the output ismain.bundle.js , the content of the final bundle includes index.js module and excludes entry.js module
how I know this is a webpack-cli bug rather webpack bug
I debug the program locally
To Reproduce
https://github.com/Mistyyyy/webpack-cli-entry-repo
Expected behavior
output: index.bundle.js
Screenshots
I had fix it locally, the reason is BasicGroup has a default entry value and override the config entry value if find defaultEntry file.
If appropriate, I am willing to submit a PR
version
Node: v12.10.0
webpack: 5.0.0-beta.13
webpack-cli: 4.0.0-beta.8
Reactions are currently unavailable
