I want to remove alert.js file from my DOM. following is the file location


I tried so many ways in my child theme's default.xml file

<remove src="Magento_Ui::js/modal/alert.js"/>

But it still load in DOM.


Try with default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <remove src="Magento_Ui::js/modal/alert.js"/>

hope it will help you

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy