Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asifpy/django-webpack-sample
Webpack with Django
https://github.com/asifpy/django-webpack-sample
Last synced: 6 days ago
JSON representation
Webpack with Django
- Host: GitHub
- URL: https://github.com/asifpy/django-webpack-sample
- Owner: asifpy
- Created: 2018-02-21T13:57:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T21:03:34.000Z (almost 7 years ago)
- Last Synced: 2024-11-17T01:49:59.496Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django-webpack-sample
This project demonstrates the usage of webpack to bundle all the static assets within the Django project. [Django webpack loader](https://github.com/ezhome/django-webpack-loader) consumes the output generated by webpack-bundle-tracker and lets you use the generated bundles in django.
## Installation and setup
- Install [pipenv](http://pipenv.readthedocs.io/en/latest/) globally.
- Install [webpack](https://webpack.js.org/guides/installation/#global-installation) globally using npm```shell
$ git clone https://github.com/asifpy/django-webpack-sample.git
$ cd django-webpack-sample
$ pipenv install (to install python packages)
$ npm install (install node packages)
```## Build project static assets
```
$ cd django-webpack-sample
$ webpack --config webpack.config.js
```
This should create bundle at `django-webpack-sample/django-webpack-sample/assets/dist/app-[hash].js` which further gets used in django templates