Handle Imports that should never be installed

This commit is contained in:
Masen Furer 2024-03-14 18:07:58 -07:00
parent 86a1e8a07e
commit f3ef8b280e
No known key found for this signature in database
GPG Key ID: 2AE2BD5531FF94F4

View File

@ -1352,9 +1352,15 @@ class CustomComponent(Component):
super()._get_imports(),
# Sweep up any imports from CustomComponent props for frontend installation.
{
library: [ImportVar(tag=None, render=False, install=True)]
library: [
ImportVar(
tag=None,
render=False,
install=not any(not imp.install for imp in imps),
),
]
for comp in self.get_custom_components()
for library in comp.get_component(comp).get_imports()
for library, imps in comp.get_component(comp).get_imports().items()
},
)