Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uglify-loader

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uglify-loader - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

3

index.js

@@ -51,4 +51,3 @@ var UglifyJS = require("uglify-js");

// tell UglifyJS2 not to emit a name by just setting outSourceMap to true
opts.outSourceMap = true;
opts.fromString = true;
opts.sourceMap = true;

@@ -55,0 +54,0 @@ var result = UglifyJS.minify(source, opts);

{
"name": "uglify-loader",
"version": "2.0.0",
"version": "3.0.0",
"description": "Uglify.js loader for webpack",

@@ -24,8 +24,6 @@ "main": "index.js",

"dependencies": {
"loader-utils": "^1.0.2",
"source-map": "^0.5.6"
},
"peerDependencies": {
"uglify-js": "^2.4.16"
"loader-utils": "^1.1.0",
"source-map": "^0.7.3",
"uglify-js": "^3.4.8"
}
}

@@ -18,2 +18,3 @@ # uglify-loader

---
**Webpack 1**
```

@@ -48,3 +49,38 @@ module: {

}
```
<br />
**Webpack 2**
```
module: {
rules: [
{
// I want to uglify with mangling only app files, not thirdparty libs
test: /.*\/app\/.*\.js$/,
exclude: /.spec.js/, // excluding .spec files
use: 'uglify-loader'
}
]
}
```
You can pass UglifyJS parameters via loader options.
```
module: {
rules: [
{
// I want to uglify with mangling only app files, not thirdparty libs
test: /.*\/app\/.*\.js$/,
exclude: /.spec.js/, // excluding .spec files
use: {
loader: 'uglify-loader',
options: {
mangle: false
}
}
}
]
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc