html-webpack-django-plugin

Simplifies creation of HTML files to serve your webpack bundles

Usage no npm install needed!

<script type="module">
  import htmlWebpackDjangoPlugin from 'https://cdn.skypack.dev/html-webpack-django-plugin';
</script>

README

HTML Webpack Django Plugin

Modified html-webpack-plugin, Plugin that simplifies creation of HTML files to serve your bundles. Adapted Plugin for usage with Django backend.

Output

Adds Django static Tag for contenthashed asset files

   <script defer src="{% static "main.542e03f941d74cd42b7f.js" %}"></script>

Install

Webpack 5

  npm i --save-dev html-webpack-django-plugin
  yarn add --dev html-webpack-django-plugin

For further instructions and source code also see:
https://github.com/jantimon/html-webpack-plugin