Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Load multiple bundles using comma-sep bundle name
If the SPLIT_CHUNKS config option is set, allow loading of multiple bundles at once. Ensures we load common dependencies only once.
  • Loading branch information
mkgs committed Oct 19, 2018
commit 5c984edef7c025d4ed1805b7c8a913ce4197f858
3 changes: 2 additions & 1 deletion webpack_loader/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ def get_bundle(self, bundle_name):
if assets.get('status') == 'done':
if self.config['SPLIT_CHUNKS']:
chunks = list()
bundle_names = set(bundle_name.split(','))
for chunk_name, chunk in assets['chunks'].items():
if bundle_name in chunk_name.split('~'):
if bundle_names & set(chunk_name.split('~')):
chunks.extend(chunk)
else:
chunks = assets['chunks'].get(bundle_name, None)
Expand Down