[ui] Don't throw exception when detecting bundles if webpack isn't ready
@@ -45,10 +45,13 @@ def get_hue_bundles(app_name, config='DEFAULT'):
"to compile.".format(app_name, timeout)
)
+ chunks = []
if assets.get('status') == 'done':
- return [chunk for chunk in assets['chunks'] if
+ chunks = [chunk for chunk in assets['chunks'] if
chunk.startswith(app_name) or
chunk.startswith('vendors~' + app_name) or
(not chunk.startswith('hue') and not chunk.startswith('vendors~hue') and app_name in chunk)]
-
+ if not chunks:
raise WebpackError("Failed to find bundles for `{0}` in config `{1}`".format(app_name, config))
+
+ return chunks
