Trying to make a django application that can have javascript components...
Using django template power combined with single file components of javascript frameworks like .vue or .jsx files.
A boilerplate to start up a full frontend and backend project very quick without needing to wrestle with rest api in both front and backend.
Server Side Render using lovely django instead of killing time with nuxt.js.
Clone project:
git clone https://github.com/usefss/django-vue.git
cd django-vue
Startup webpack:
npm install
npm start
Startup django:
pip install -r requirements.txt
./manage migrate
./manage runserver 0.0.0.0:8000
Go to 127.0.0.1:8000, and you can see a dynamic rendered vue component starting on page.
Any change that makes this better is welcomed.
How to use webpack caching and hash file names with django seperated templates?
What is the correct order to include statics in html?
Changing webpack to compile all files in src folder to seperate .js for sake of code spliting optimization.
Add something to django watcher to auto load compiled .js files to template base and reload browser.
Structure project in a charming shape.
django webpack loader package for django it is very large for my purpose and has problems with webpack>=4.
django + webpack, explains about splitChunks and the options for stacking javascript with django.
django + webpack, very simple approach.
working example repo, showing the last working state, why I am doing this? :/
configure vue.js with webpack.
django webpack loader, finall working example of webpack with django, although not providing components structure and need some times to configure it.
webpack bunle tracker plugin, solution from django-webpack-loader to track all hashed build files of webpack with django.