You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
@eahefnawy I'd like to suggest/discuss an alternative way of handling component downloads.
The main problem for me is that Template throws an error if it doesn't find the component package on NPM. However, my component packages are still far from ready for publishing to NPM, and they are located in my monorepo with all the other packages, and are resolvable via node_modules.
I have 2 possible solutions:
when a component is not found on NPM, but can be resolved via require.resolve - just use that and do not throw an error.
add a configuration flag to component, something like this:
api:
component: '@webiny/microservice'registry: false // <-- this would skip all registry checks
I personally prefer the first solution as it does not require any additional code/configuration on developer's side.
Currently the only packages that are not downloaded are the ones starting with ., which is not very useful, as I want to use the component name as a regular npm module, like @webiny/microservice, but it is a local/private package that is not on npm.
Looking forward to hearing your opinion on this! 🍻
EDIT:
Here is the modification required to implement the first solution.