How to avoid duplicate dependencies in gutenberg blocks


The wordpress gutenberg block build script uses @wordpress/dependency-extraction-webpack-plugin to build the blocks without wordpress dependencies being repeated but what about other dependencies?

If I build a plugin with 10 blocks and they all re-use dependencies, the wordpress build script will embed the dependency in every block bundle.

Is there a good way to handle this without having to re-create webpack build myself?