-
-
Notifications
You must be signed in to change notification settings - Fork 667
parallelism not work #2873
Copy link
Copy link
Closed
Description
Bug report
What is the current behavior?
https://webpack.docschina.org/configuration/configuration-types/#parallelism
parallelism does not work
If the current behavior is a bug, please provide the steps to reproduce.
index.js
console.log(`test ${Math.random()}`)
console.log(`test ${Math.random()}`)
console.log(`test ${Math.random()}`)
console.log(`test ${Math.random()}`)
console.log(`test ${Math.random()}`)
console.log(`test ${Math.random()}`)webpack.config.js
const path = require("path")
const SimpleProgressWebpackPlugin = require("simple-progress-webpack-plugin")
const configs = []
for (let i = 0; i < 3; i++) {
configs.push({
name: `build${i}`,
entry: "./index",
output: {
path: path.join(__dirname, "dist"),
filename: `build${i}.js`,
},
plugins: [
new SimpleProgressWebpackPlugin({
name: `build${i}`,
format: "simple",
}),
],
})
}
module.exports = configs
module.exports.parallelism = 1output:
build0
❯ Compile modules
build1
❯ Compile modules
build2
❯ Compile modules
❯ Build modules
❯ Build modules
❯ Build modules
❯ Optimize modules
❯ Optimize modules
❯ Optimize modules
❯ Emit files
Finished after 0.244 seconds.
❯ Emit files
Finished after 0.242 seconds.
❯ Emit files
Finished after 0.254 seconds.
build0
❯ Emit files
Finished after 0.000 seconds.
build1
❯ Emit files
Finished after 0.000 seconds.
build2
❯ Emit files
Finished after 0.001 seconds.
build0:
asset build0.js 222 bytes [compared for emit] [minimized] (name: main)
./index.js 222 bytes [built] [code generated]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
build0 (webpack 5.47.1) compiled with 1 warning in 237 ms
build1:
asset build1.js 222 bytes [compared for emit] [minimized] (name: main)
./index.js 222 bytes [built] [code generated]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
build1 (webpack 5.47.1) compiled with 1 warning in 230 ms
build2:
asset build2.js 222 bytes [compared for emit] [minimized] (name: main)
./index.js 222 bytes [built] [code generated]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
build2 (webpack 5.47.1) compiled with 1 warning in 215 msWhat is the expected behavior?
Other relevant information:
webpack version: 5.47.1
Node.js version: v14.16.1
Operating System: ubuntu
Additional tools: "webpack-cli": "^4.7.2"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels