Revert "[perf] add webpack 4 + SplitChunks + lazy load visualizations" (#5253)

* Revert "[sqllab] Fix sql lab resolution link (#5216)"

This reverts commit 93cdf60920.

* Revert "Pin botocore version (#5184)"

This reverts commit 70679d4c93.

* Revert "Describe the use of custom OAuth2 authorization servers (#5220)"

This reverts commit a84f4304de.

* Revert "[bubble-chart] Fixing issue w/ metric names (#5237)"

This reverts commit 5c106b9a20.

* Revert "[adhoc-filters] Adding adhoc-filters to all viz types (#5206)"

This reverts commit d483ed121c.

* Revert "[perf] add webpack 4 + SplitChunks + lazy load visualizations (#5240)"

This reverts commit 1fc4ee0d3c.
This commit is contained in:
John Bodley
2018-06-20 12:07:42 -07:00
committed by GitHub
parent 93cdf60920
commit 62427c8b8d
21 changed files with 2553 additions and 1533 deletions

View File

@@ -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)
#################################################################