Propose alternative way to load plugins ( support local plugins ) #12
ThePlenkov
started this conversation in
Ideas
Replies: 1 comment
-
Alternatively ( and this is already respecting the existing code ) we may support the option to provide a custom folder to load plugins from. So if we can provide array of plugin roots
But again - i don't think it's a good idea to mention path to a plugin somewhere. It should be enough to give a plugin name and then just import it dynamically like import('@namespace/plugin-name'). Module resolution should be delegated to the framework ( like Node, Typescript + package manager ). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
As we remember some time ago we had the cds.plugins property where we could mention list of plugins.
Later on an automatic plugin detection logic was introduced which scans package.json and finds all plugins with cds-plugin.js file in root.
I see here few problems:
Thefore I'd like to kindly ask to support cds.plugins option back ( via package.json or cdsrc.json ) which we can use like this ( in yaml just for better readability )
It may work in addition to plugins resolved with a current logic ( but respectig disable flag ).
What do you think about this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions