mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
Revert "[perf] add webpack 4 + SplitChunks + lazy load visualizations" (#5253)
* Revert "[sqllab] Fix sql lab resolution link (#5216)" This reverts commit93cdf60920. * Revert "Pin botocore version (#5184)" This reverts commit70679d4c93. * Revert "Describe the use of custom OAuth2 authorization servers (#5220)" This reverts commita84f4304de. * Revert "[bubble-chart] Fixing issue w/ metric names (#5237)" This reverts commit5c106b9a20. * Revert "[adhoc-filters] Adding adhoc-filters to all viz types (#5206)" This reverts commitd483ed121c. * Revert "[perf] add webpack 4 + SplitChunks + lazy load visualizations (#5240)" This reverts commit1fc4ee0d3c.
This commit is contained in:
@@ -47,37 +47,23 @@ def parse_manifest_json():
|
||||
global manifest
|
||||
try:
|
||||
with open(MANIFEST_FILE, 'r') as f:
|
||||
# the manifest inclues non-entry files
|
||||
# we only need entries in templates
|
||||
full_manifest = json.load(f)
|
||||
manifest = full_manifest.get('entrypoints', {})
|
||||
manifest = json.load(f)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def get_js_manifest_files(filename):
|
||||
def get_manifest_file(filename):
|
||||
if app.debug:
|
||||
parse_manifest_json()
|
||||
entry_files = manifest.get(filename, {})
|
||||
return entry_files.get('js', [])
|
||||
|
||||
|
||||
def get_css_manifest_files(filename):
|
||||
if app.debug:
|
||||
parse_manifest_json()
|
||||
entry_files = manifest.get(filename, {})
|
||||
return entry_files.get('css', [])
|
||||
return '/static/assets/dist/' + manifest.get(filename, '')
|
||||
|
||||
|
||||
parse_manifest_json()
|
||||
|
||||
|
||||
@app.context_processor
|
||||
def get_manifest():
|
||||
return dict(
|
||||
js_manifest=get_js_manifest_files,
|
||||
css_manifest=get_css_manifest_files,
|
||||
)
|
||||
def get_js_manifest():
|
||||
return dict(js_manifest=get_manifest_file)
|
||||
|
||||
|
||||
#################################################################
|
||||
|
||||
Reference in New Issue
Block a user