Skip to content

chunkgitsha not included in generated stats #2

Description

@joscarsson

First of all, thanks for a great plugin :)

I have a slight issue where the chunkgitsha does not seem to be included in the stats output (so I can't refer to it afterwards). I usually do something like:

var webpack = require('webpack');
var webpackConfig = require('../webpack-production.config');

webpack(webpackConfig, function(err, stats) {
  var jsonstats = stats.toJson({ hash: true, chunkgitsha: true });
  console.log('hash', jsonstats.hash); // this is the webpack compilation hash
  console.log('chunkgitsha', jsonstats.chunkgitsha); // this is undefined
});

Would it be possible to include that in stats somehow?

Also, it would be great with an option to just get the latest commit's sha instead of the latest commit sha that affected the bundle. Maybe another variable, [gitsha] in addition to [chunkgitsha]?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions