File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 55"""
66from pathlib import Path
77
8+ import webpack_loader
89from django .conf import settings
910from django .core .exceptions import ImproperlyConfigured
1011
@@ -43,11 +44,6 @@ def add_webpack_js_to_fragment(fragment, bundle_name):
4344 """
4445 Add all JS webpack chunks to the supplied fragment.
4546 """
46- # Importing webpack_loader.utils at the top of the module causes an exception:
47- # OSError: Error reading webpack-stats.json.
48- # Are you sure webpack has generated the file and the path is correct?
49- # We are not quite sure why.
50- from webpack_loader .utils import get_files
51- for chunk in get_files (bundle_name , None , 'DEFAULT' ):
47+ for chunk in webpack_loader .utils .get_files (bundle_name , None , 'DEFAULT' ):
5248 if chunk ['name' ].endswith (('.js' , '.js.gz' )):
5349 fragment .add_javascript_url (chunk ['url' ])
You can’t perform that action at this time.
0 commit comments