Skip to content

MultiCompiler didn't release memory after one compiler is finished. #15521

@Edge00

Description

@Edge00

Bug report

What is the current behavior?
I use MultiCompiler configs.
If i run them one by one, Webpack can build them all.

const config = {}
webpack(config)

If i run them together, OOM appeares.

const configs = [config1, config2, config3, config4]
webpack(configs)

If the current behavior is a bug, please provide the steps to reproduce.
MultiCompiler uses more memory than single compiler.

What is the expected behavior?
Each compiler should work separately. when one is finished, who's memory should be released.

Other relevant information:
webpack version: 5.70.0
Node.js version: 14.17.1
Operating System: macOS 11.6
Additional tools: none

Part of configuration
entries (each compiler): 2 + 159 + 230
cache: dsiabled
mode: 'production'
loaders: babel / postcss / vue-laoder
minimizer: terser / css-minimizer-webpack-plugin
devtool: false
target: ['web', 'es5']

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions