React, react dom and lodash loaded by vipps plugin
kimmenbert opened this issue · 3 comments
This plugins enqueues lodash, react etc. on every page because of this:
vipps-woocommerce/Vipps.class.php
Line 911 in eb6aeb4
Please add checks that the all products blocks is in use on current page before enqueuing this
Right; I'll add has_block
in that spot.
Though that's going to be a problem in the future when block-based widgets becomes the norm. Still, for now I'll make a test.
Fixed (for november 2020) in 1.6.2. A filter is in place to allow people using the All Products Block on other-than-pages to ensure the files are loaded.
Future plan is to use wp_script_is to check if the dependencies are all in fact queued (in which case, enqueue) and/or a backend setting to force loading of the react stuff.