Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use HTML Webpack Plugin with a django base template?

Tags:

webpack

I am learning Webpack 2, and I'm trying to integrate it with a Django project. there is a plugin for webpack, the HTML Webpack Plugin, this plugin can take a template and use it to generate another html file containing the style and script tags injected because the name of the js and css bundles contain a [hash] generated by another plugin. the question is, can I use my Django's base.html file as the template file for the html Webpack plugin?. base.html contain template tags and Django DTL specific code. and if not. how can I automate the injection of the bundle files without me doing that manually. which is a lot of work.

like image 889
osama7901 Avatar asked Mar 17 '17 15:03

osama7901


1 Answers

Yes, you should be able to do this with custom templates for the plugin.

like image 93
Ivan Avatar answered Oct 23 '22 15:10

Ivan