How to avoid duplicate dependencies in gutenberg blocks


The wordpress gutenberg block build script uses WPBeginner - WordPress Tutorials/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?

Guerrilla 4 months 0 Answers 12 views 0

Leave an answer