Skip to content

Magento2 Recipe: Disable static content deployment and di:compile generation when in developer mode #3710

Closed Answered by peterjaap
diazwatson asked this question in Help needed
Discussion options

You must be logged in to vote
task('magento:compile', function () {
    if (run('{{bin/php}} {{bin/magento}} deploy:mode:show') !== 'developer') {
        run("{{bin/php}} {{bin/magento}} setup:di:compile");
        run('cd {{release_or_current_path}}/{{magento_dir}} && {{bin/composer}} dump-autoload -o');
    }
});

.. same for assets.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by diazwatson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants