Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ngmin-webpack-plugin
Advanced tools
Runs the ngmin pre-minimizer to insert AngularJS DI annotations, so instead of writing
angular.module('whatever')
.controller('MyCtrl', ['$scope', '$http',
function ($scope, $http) { ... }]);
you can write
angular.module('whatever')
.controller('MyCtrl', function ($scope, $http) { ... });
In your webpack config:
var ngminPlugin = require("ngmin-webpack-plugin");
module.exports = {
// your config and junk
plugins: [
new ngminPlugin() // or, new ngminPlugin({dynamic: true}) for dynamic mode.
]
}
As a more realistic example, if you're running webpack from a script (like gulp or grunt):
var webpack = require("webpack");
var ngminPlugin = require("ngmin-webpack-plugin");
var webpackConfig = require("./webpack.config.js");
var argv = require("minimist")(process.argv.slice(2));
// --production option
if (argv.production) {
webpackConfig.plugins = webpackConfig.plugins.concat(new ngminPlugin(), new webpack.optimize.UglifyJsPlugin());
webpackConfig.devtool = false;
}
webpack webpackConfig, (err, stats) ->
if (err)
throw err
console.log stats.toString
FAQs
Webpack plugin that runs ngmin on your bundles.
The npm package ngmin-webpack-plugin receives a total of 3 weekly downloads. As such, ngmin-webpack-plugin popularity was classified as not popular.
We found that ngmin-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.