0

On Magento 2.3.5 how to remove jquery/ui-modules/slider.js

I am trying to remove it from default_head_blocks.xml

<remove src=" jquery/ui-modules/slider.js"/>

view.xml

<item type="file">Lib::jquery/ui-modules/slider.js</item>

But still i am not able to remove this file.

1 Answer 1

0

You can't direct remove it from xml file. It's requireJS dependency mechanism JS which is loading from many other JS file.

You can only remove that JS file from XML which is loading from layout XML file.

3
  • are you talking about remove dependency from JS file or from XML file? Aug 6, 2021 at 5:59
  • You can't directly remove that JS which is loading using requireJS. You can only remove JS file which was loading from layout XML. Aug 6, 2021 at 6:01
  • for ex : Lib::jquery/ui-modules/slider.js if this JS file was loading from default_head_blocks.xml then, you can remove it by <remove> tag. But, it was loading from requireJS dependency mechanism. So, you can't remove it. Aug 6, 2021 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.