How to Discard JavaScript and CSS from other Themes in shopware 5?

To discard JavaScript and CSS from other themes in shopware 5 follow the below steps:

Step 1: Go to your theme your directory in shopware 5 setup.

Step 2: Open Theme.php file to discard the js and css.

This image has an empty alt attribute; its file name is Screenshot_1-1.png

Step 3: Add below code in Theme.php file.

protected $discardedLessThemes = [\Shopware\Themes\Responsive\Theme::class]; //for CSS

protected $discardedJavascriptThemes = [\Shopware\Themes\Responsive\Theme::class]; // for JavaScript

Note : It will discard the CSS and JavaScript from the Frontend.

Result: