Hello People,
I completed the tutorial 'Develop your first extension'. Is there a documentation for when developing an extension with Multiple Modules?
Any reference to docs would be really appreciated. Thanks.
Just create a new module folder under the same extension path. Your manifest for the extension should rebuild to include the new modules when you run gulp extension:local or gulp extension:deploy
a
Anas Jakwani
10/20/2023, 1:42 PM
I did that. I just want to understand the architecture and how the views and models will be referenced between modules.
r
Ryan Valizan
10/20/2023, 1:46 PM
Your views and models should have dependency names which would be used to require the module much like you require NS modules by ‘N/module’
You also can also add a dependency using relative location. So if you have an unnamed dependency in module a, but what to use it in module B you would use the ../ModuleA/JavaScript/file_name.js as your dependency path.
Hope that helps.