unminified-webpack-plugin
Advanced tools
Comparing version 1.4.2 to 2.0.0
@@ -30,8 +30,8 @@ const webpack = require('webpack'); | ||
if (!containUgly.length) { | ||
return console.log('Ignore generating unminified version, since no UglifyJsPlugin provided'); | ||
if (!containUgly.length && compiler.options.mode === 'development') { | ||
return console.log('Ignore generating unminified version, since no UglifyJsPlugin provided, or running in development mode'); | ||
} | ||
compiler.plugin('compilation', function(compilation) { | ||
compilation.plugin('additional-assets', function(cb) { | ||
compiler.hooks.compilation.tap('UnminifiedWebpackPlugin', function(compilation) { | ||
compilation.hooks.additionalAssets.tap('UnminifiedWebpackPlugin', function() { | ||
const files = []; | ||
@@ -70,3 +70,2 @@ compilation.chunks.forEach(function(chunk) { | ||
}); | ||
cb(); | ||
}); | ||
@@ -73,0 +72,0 @@ |
{ | ||
"name": "unminified-webpack-plugin", | ||
"version": "1.4.2", | ||
"version": "2.0.0", | ||
"description": "A `webpack` plugin for generating un-minified JavaScript files along with UglifyJsPlugin.", | ||
@@ -31,5 +31,8 @@ "main": "index.js", | ||
"del": "^3.0.0", | ||
"mocha": "^4.0.1", | ||
"webpack": "^3.6.0" | ||
"mocha": "^5.0.2", | ||
"webpack": "^4.0.0" | ||
}, | ||
"peerDependencies": { | ||
"webpack": "^4.0.0" | ||
} | ||
} |
@@ -45,7 +45,2 @@ unminified-webpack-plugin | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
} | ||
}), | ||
new UnminifiedWebpackPlugin() | ||
@@ -78,7 +73,2 @@ ] | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
} | ||
}), | ||
new UnminifiedWebpackPlugin({ | ||
@@ -85,0 +75,0 @@ postfix: 'unmin'//specify "nomin" postfix, |
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
8007
1
60
98