I've created a custom module for developer mode only. So, I want to create functionality that disables module automatically when mode change from developer to production.


This is where composer comes in handly:

Add the module to the require-dev part of your composer.json. In your production system you get all packes WITHOUT dev: composer install --no-dev In your local enviroment you just composer install to get all packes which are located in the require-dev part.

Fore more information read here: composer require dev version

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.