Expected Behavior
plugin-terser shares the nameCache between minify invocations when rollup is configured to create multiple entry files and common files.
Actual Behavior
plugin-terser does not share the nameCache when rollup is configured to create multiple entry files and common files, this results in property mangling where names do not match between chunks.
Additional Information
In the linked reproduction observe that
- in file
dist/common.js the method Foo._bar() is renamed to .o().
- in file
dist/entry2.js the method Foo._bar() is renamed to .m().
If you inspect the execution of the terser plugin, it is observed that the nameCache is not shared between invocations of minify. This is true even for maxWorkers: 1.