fix CSS bundle order issue.

a final fix for https://github.com/lnbits/lnbits/issues/99
This commit is contained in:
fiatjaf 2020-10-17 15:24:22 -03:00
parent 32d75f7a60
commit 11e04e4314

View File

@ -75,7 +75,18 @@ def get_js_vendored(prefer_minified: bool = False) -> List[str]:
def get_css_vendored(prefer_minified: bool = False) -> List[str]:
return get_vendored(".css", prefer_minified)
paths = get_vendored(".css", prefer_minified)
def sorter(key: str):
if "quasar@" in key:
return 1
if "vue@" in key:
return 2
if "chart.js@" in key:
return 100
return 9
return sorted(paths, key=sorter)
def get_vendored(ext: str, prefer_minified: bool = False) -> List[str]: