WordPress Development Asked by Lovor on December 5, 2020
I grabbed gallery block from Gutenberg github (Gallery block) and I wanted to modify it in following way: only first image is output to the html, while the rest are sent to lightbox javascript plugin.
However, when compiled and used, I am getting a bunch of excess dependencies in the frontend like lodash, react, react.dom and so on. Gutenberg does not output these dependencies in the frontend.
How to prevent outputting these dependencies?
they are getting outputed in index.asset.php. I am using @wordpress/create-block to work and compile with blocks.
It looks it was some kind of internal malfunctioning of webpack. After deleting everything from plugin directory (saving src files aside) and again installing @wordpress/create-block, the problem was solved.
Answered by Lovor on December 5, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP