/python-webpack-boilerplate

Django Webpack boilerplate & Flask Webpack boilerplate

Primary LanguagePythonMIT LicenseMIT

README

Build Status PyPI version Documentation

Jump start frontend project bundled by Webpack

What is included.

  1. A frontend project template which has good structure, easy to use and customize. You can create the frontend project with just ONE command, and use it even you have no idea how to config Webpack.
  2. Custom template tags which can help load Webpack bundle file in the templates transparently.

Features

  • Supports Django and Flask (will support more framework in the future)
  • Automatic multiple entry points
  • Automatic code splitting
  • Hot Module Replacement (HMR) (auto reload web page if you edit JS or SCSS)
  • Easy to config and customize
  • ES6 Support via babel (v7)
  • JavaScript Linting via eslint
  • SCSS Support via sass-loader
  • Autoprefixing of browserspecific CSS rules via postcss and postcss-preset-env
  • Style Linting via stylelint

Optional support

Need install extra packages

  • React
  • Vue
  • Tailwind CSS
  • Bootstrap (Default theme)

Documentation

NOTE: From v0.0.5, we have renamed the python package from webpack_loader to webpack_boilerplate.

  1. Setup With Django
  2. Setup With Flask
  3. Frontend Workflow
  4. Tailwind CSS
  5. Import React
  6. Import Vue

Special Thanks

References

  1. Setup Webpack Project with Django
  2. Load Webpack bundles in Django
  3. Linting in Webpack
  4. Load Webpack hash bundle in Django
  5. Code splitting with Webpack
  6. How to config HMR with Webpack and Django