7

When removing all the pub/static files in Magento 2 and opening the homepage, the files are generated as symlinks. When using the command setup:static-content:deploy the files are copied, even after setting the deploy mode to developer with the command bin/magento deploy:mode:set developer. How can I get the static generated as symlinks from terminal, as in the browser it takes much more longer?

8

I was able to resolve this by adding this node in app/etc/di.xml

<type name="Magento\Deploy\Model\Deploy\LocaleDeploy">
        <arguments>
            <argument name="assetPublisher" xsi:type="object">developerPublisher</argument>
        </arguments>
    </type>

For magento 2.2 code will be

 <type name="Magento\Deploy\Service\DeployStaticFile">
    <arguments>
        <argument name="assetPublisher" xsi:type="object">developerPublisher</argument>
    </arguments>
</type>

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.