Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack configuration #32

Merged
merged 4 commits into from
Nov 19, 2018
Merged

Commits on Nov 19, 2018

  1. Install Webpack "bundle analyzer" and "Git revision" plugin packages

    Installed the first Webpack (1) plugins:
    
    - "webpack-bundle-analyzer" (2) - Visualizes the size of Webpack output
      files with an interactive zoomable treemap.
    - "git-revision-webpack-plugin" - Generates VERSION and COMMITHASH files
      during build based on a local Git repository.
    
    References:
      (1) https://webpack.js.org
      (2) https://www.npmjs.com/package/git-revision-webpack-plugin
      (3) https://www.npmjs.com/package/webpack-bundle-analyzer
    
    GH-31
    arcticicestudio committed Nov 19, 2018
    Configuration menu
    Copy the full SHA
    b18dfdb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    187237a View commit details
    Browse the repository at this point in the history
  3. Add and configure the webpack-bundle-analyzer plugin

    Configured  the `webpack-bundle-analyzer` (1) plugin to generate a
    "static" report with a JSON stats file stored in a newly created build
    directory within the project root.
    
    References:
      (1) https://github.com/webpack-contrib/webpack-bundle-analyzer
    
    GH-31
    arcticicestudio committed Nov 19, 2018
    Configuration menu
    Copy the full SHA
    87fb27a View commit details
    Browse the repository at this point in the history
  4. Add and configure git-revision-webpack-plugin

    Configured `git-revision-webpack-plugin` (1) to provide the version,
    commit hash and branch as environment variables through through the
    `webpack.DefinePlugin` (2).
    The data is exposed through the following environment variables:
    
    - `NORD_DOCS_GIT_VERSION`
    - `NORD_DOCS_GIT_COMMITHASH`
    - `NORD_DOCS_GIT_BRANCH`
    
    References:
      (1) https://github.com/pirelenito/git-revision-webpack-plugin
      (2) https://webpack.js.org/plugins/define-plugin
    
    GH-31
    arcticicestudio committed Nov 19, 2018
    Configuration menu
    Copy the full SHA
    60cff32 View commit details
    Browse the repository at this point in the history