- 
  Notifications
 You must be signed in to change notification settings 
- Fork 342
Closed
@EthanZeigler 
Description
Description
When using multiple bundles on the same page, shared dependencies are included more than once. For example, when using a "global" bundle and a specific app on the same page, shared chunks between them are sourced multiple times. This is especially problematic when global libraries like bootstrap are in those shared chunks.
Expected
When rendering a template or set of templates (extension), shared chunks are sourced only once
Actual
Shared chunks are included on the rendered page more than once, breaking libraries that rely on only having one instance.
Basic example
Given 2 bundles global and pageapp and shared chunk chunk...
{% load render_bundle from webpack_loader %}
{% render_bundle 'global' 'js' %}
{% render_bundle 'pageapp' 'js' %}
output currently is
<script type="text/javascript" src="http://localhost:8001/chunk.js"></script>
<script type="text/javascript" src="http://localhost:8001/global.js"></script>
<script type="text/javascript" src="http://localhost:8001/chunk.js"></script>
<script type="text/javascript" src="http://localhost:8001/pageapp.js"></script>
Metadata
Metadata
Assignees
Labels
No labels