🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

webpack-runtime-analyzer

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-runtime-analyzer - npm Package Compare versions

Comparing version
1.4.3
to
1.5.0
+7
-0
CHANGELOG.md

@@ -0,1 +1,8 @@

## 1.5.0 (May 20, 2017)
### UI
- supported sorting for the tables (#16)
- added modules stat at the top of the table in detail page (#16)
## 1.4.3 (April 27, 2017)

@@ -2,0 +9,0 @@

+1
-1
{
"name": "webpack-runtime-analyzer",
"version": "1.4.3",
"version": "1.5.0",
"description": "Webpack plugin for analyzing internal processes, state and structure of bundles",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

'use strict';
var NAME = 'webpack-runtime-analyzer';
var parseQuery = require('loader-utils/lib/parseQuery.js');
var webpack = require('webpack');
var ConcatSource = require('webpack-sources').ConcatSource;
var RequestShortener = require('webpack/lib/RequestShortener');
var fork = require('child_process').fork;
var rempl = require('rempl');
var path = require('path');
var fs = require('fs');
var opn = require('opn');
var openInEditor = require('open-in-editor');
var editor;
var remplDist;
var requestShortener;
function isObject(obj) {
return typeof obj == 'object' && obj;
}
function cloneArray(array) {
return array.map(function(el) {
if (Array.isArray(el)) {
return cloneArray(el);
}
if (isObject(el) && el.constructor == Object) {
return deepExtend({}, el);
}
return el;
});
}
function deepExtend(target) {
var sources = Array.prototype.slice.call(arguments, 1);
if (typeof target != 'object' || !target) {
return;
}
for (var i = 0; i < sources.length; i++) {
var source = sources[i];
if (isObject(source)) {
for (var sourceKey in source) {
if (source.hasOwnProperty(sourceKey)) {
var value = source[sourceKey];
if (Array.isArray(value)) {
target[sourceKey] = cloneArray(value);
} else if (isObject(value) && value.constructor == Object) {
target[sourceKey] = deepExtend({}, value);
} else {
target[sourceKey] = value;
}
}
}
}
}
return target;
}
function RuntimeAnalyzerPlugin() {
}
RuntimeAnalyzerPlugin.prototype.apply = function(compiler) {
compiler.plugin('compilation', function(compilation) {
requestShortener = new RequestShortener(compilation.options.context || process.cwd());
compiler.parser.plugin('expression someVar', function() {
if (!this.state.module) {
return;
}
this.state.current.addVariable('someVar', '123');
return true;
});
compilation.plugin('build-module', function(module) {
console.log('BUILD MODULE', module.readableIdentifier(requestShortener));
});
});
};
module.exports = RuntimeAnalyzerPlugin;

Sorry, the diff of this file is too big to display