Skip to content

Latest commit

 

History

History
21 lines (19 loc) · 1.55 KB

structure.md

File metadata and controls

21 lines (19 loc) · 1.55 KB

Webpack: Project structure

  • bundles/
    • build-dev/
      Contains the generated development bundles.

    • dist/
      Contains the generated production bundles.

    • webpack-config/
      Contains the Webpack configuration files. dev (development) and prod (production) configurations inherit from base. To understand Webpack's configuration syntax, check the docs. To understand the plugin functionality and configuration, check this short guide that was used as an inspiration.

      • webpack.base.conf.js
      • webpack.dev.conf.js
      • webpack.prod.conf.js
    • package.json
      This serves as npm's build script and management tool. The most significant parts are the dependencies (names of packages and their versions) and the scripts (shortcuts for commands).

      npm run build, npm run build:dev are defined here and are used to run Webpack with the corresponding configuration files as arguments.

    • package-lock.json
      Check npm's documentation.

    • webpack-stats.dev.json

    • webpack-stats.prod.json
      These files are auto-generated by the Webpack plugin webpack-bundle-tracker and are used as an information gateway between Webpack and Django, via the Django library django-webpack-loader. Django integration is explained in more detail here.