You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-2
Original file line number
Diff line number
Diff line change
@@ -260,7 +260,48 @@ INSTALLED_APPS = (
260
260
</head>
261
261
```
262
262
263
-
<br>
263
+
### Preload
264
+
265
+
The `is_preload=True` option in the `render_bundle` template tag can be used to add `rel="preload"` link tags.
266
+
267
+
```HTML+Django
268
+
{% load render_bundle from webpack_loader %}
269
+
270
+
<html>
271
+
<head>
272
+
{% render_bundle 'main''css' is_preload=True %}
273
+
{% render_bundle 'main''js' is_preload=True %}
274
+
275
+
{% render_bundle 'main''css'%}
276
+
</head>
277
+
278
+
<body>
279
+
{% render_bundle 'main''js'%}
280
+
</body>
281
+
</html>
282
+
```
283
+
284
+
### Appending file extensions
285
+
286
+
The `suffix` option can be used to append a string at the end of the file URL. For instance, it can be used if your webpack configuration emits compressed `.gz` files.
0 commit comments