0

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

"vendor\magento\module-ui\view\base\web\js\modal\alert.js"

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.

0

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">
<head>
    <remove src="Magento_Ui::js/modal/alert.js"/>
</head>

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