Showing results for 
Search instead for 
Did you mean: 

Remove / Extend checkout component

Remove / Extend checkout component


I have a current issue on a theme that I'm working on where I want to extend the message component:


<item name="component" xsi:type="string">Magento_Ui/js/view/messages</item>


To extend the file I created a new file in my own theme called 'messages-new.js' in the correct location, and then in my own Magento_Checkout module folder have the checkout_index_index.xml where I insert the following code


<item name="errors" xsi:type="array">

    <item name="sortOrder" xsi:type="string">0</item>

    <item name="component" xsi:type="string">Magento_Ui/js/view/messages-new</item>

    <item name="displayArea" xsi:type="string">messages</item>



However, although the new file i've created successfully extends the component how I want, and is added to the checkout, I cannot find a way to remove the original messages.js


My component is added to the "errors" array and loads both components.


How do i go about removing the original component so only my new one is loaded.