I want to include my own js or include only a few js in require.js, but need to exclude all js files / css files being loaded default by Magneto or any module.

It is explained here:


As per the docs, I should include in my:



<remove src="Magento_Catalog::js/compare.js" />

I have done exactly that but it doesn't seem to be working.

but it is working for other instances for example

<remove src="MGS_Mpanel::js/timer.js"/>

This line is removing timer.js

In a nutshell, I want to remove all js (barring few) from my custom theme.

Your Answer

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

Browse other questions tagged or ask your own question.