There was an error while loading. Please reload this page.
1 parent cf59b2c commit 70ae329Copy full SHA for 70ae329
webpack_loader/utils.py
@@ -15,7 +15,8 @@
15
'STATS_FILE': 'webpack-stats.json',
16
# FIXME: Explore usage of fsnotify
17
'POLL_INTERVAL': 0.1,
18
- 'IGNORE': ['.+\.hot-update.js', '.+\.map']
+ 'IGNORE': ['.+\.hot-update.js', '.+\.map'],
19
+ 'LOCAL': True,
20
}
21
22
@@ -44,8 +45,12 @@ def get_config(config_name):
44
45
46
47
def get_assets(config):
48
+ if not config["LOCAL"]:
49
+ open_file_func = staticfiles_storage.open
50
+ else:
51
+ open_file_func = open
52
try:
- with open(config['STATS_FILE']) as f:
53
+ with open_file_func(config['STATS_FILE']) as f:
54
return json.load(f)
55
except IOError:
56
raise IOError(
0 commit comments