cancel
Showing results for 
Search instead for 
Did you mean: 

How to add custom js library in composer metapackage

How to add custom js library in composer metapackage

I have a doubt about packaging modules in Magento 2. I have 2 module folders along with one lib folder for an Extension.
example
app/code/vendor/module1
app/code/vendor/module2
lib/internal/vendor/module

 

So I planned to create shared packages and use Metapackages to create an extension as per https://devdocs.magento.com/guides/v2.3/extension-dev-guide/package/package_module.html .


I could able to create a shared package for app/code/vendor/module1 & app/code/vendor/module1, but could not able to create a shared package for lib/internal/vendor/module as magento2-library, the marketplace is not accepting this module and showing "magento2-library" is not valid as type in composer.json. Please guide me to add library files @lib/internal/vendor/module in extension

 

1 REPLY 1

Re: How to add custom js library in composer metapackage

@shantyjustus 

 

You should follow the same link:

https://devdocs.magento.com/guides/v2.4/extension-dev-guide/package/package_module.html

 

in this they defined the package should be magento2-library or you can define in vendor too and create symlink then to lib folder.

Manish Mittal
https://www.manishmittal.com/