I just wanted to analyze the output of webpack from within a plugin, and it took quite a bit of poking to line up the chicken bones.
function StringsPlugin() {}
StringsPlugin.prototype.apply = function (compiler) {
compiler.plugin('after-emit', function (compilation) {
Object.keys(compilation.assets).forEach(function (basename) {
console.log(compilation.assets[basename].source());
});
});
};
module.exports = StringsPlugin;
I just wanted to analyze the output of webpack from within a plugin, and it took quite a bit of poking to line up the chicken bones.