uglify-loader
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -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 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5536
85
54
+ Addeduglify-js@^3.4.8
+ Addedsource-map@0.7.4(transitive)
+ Addeduglify-js@3.19.3(transitive)
- Removedalign-text@0.1.4(transitive)
- Removedcamelcase@1.2.1(transitive)
- Removedcenter-align@0.1.3(transitive)
- Removedcliui@2.1.0(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedkind-of@3.2.2(transitive)
- Removedlazy-cache@1.0.4(transitive)
- Removedlongest@1.0.1(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedright-align@0.1.3(transitive)
- Removedsource-map@0.5.7(transitive)
- Removeduglify-js@2.8.29(transitive)
- Removeduglify-to-browserify@1.0.2(transitive)
- Removedwindow-size@0.1.0(transitive)
- Removedwordwrap@0.0.2(transitive)
- Removedyargs@3.10.0(transitive)
Updatedloader-utils@^1.1.0
Updatedsource-map@^0.7.3