2

I'm trying to install my custom module using composer.json file and after run composer update command my custom module installed successfully in magento2.

Actually I want to install my custom module in app/code directory using composer.json and I have found some solution from dedicated developers and add extra section in my composer.json as following:

"extra": {
    "map": [
        [
            "*",
            "Gotham/Customimgattr"
        ]
    ]
}

Using the above code snippet my module added in app/code folder but also added in vendor directory. So anyone knows how to install custom module in app/code folder only not in vendor using composer.json file? Thanks in advance. My composer.json file:-

{
    "name": "myproject/mymodule",
    "description": "Upload Db Schema",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
     "require": {
        "php": "7.0.2|7.0.4|~7.0.6|~7.1.0"
      },
      "type": "magento2-module",
      "version": "1.0.0",
      "extra": {
        "map": [
            [
                "*",
                "Gotham/Customimgattr"
            ]
        ]
      }
}

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.