DJS
DJS copied to clipboard
Using ObjectManager is not advised ...
https://github.com/goivvy/DJS/blob/e4d58a34e556fe5f8392898beeaf9c2fed869af4/Plugin/ResponsePlugin.php#L20
I appreciate anyone willing to post there code here and the effort involved with supporting it... I was going to attempt a plugin like this for page insights, but stumbled on this, which uses di and observer ...
https://github.com/MeetanshiInc/Magento-2-Defer-Parsing-of-JavaScript
thoughts on this solution vs yours?
yes, I think the better way is using Dependency Injection method