Skip to content

Commit

Permalink
Fix validation error with default uglify options
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanbruegge committed Oct 11, 2017
1 parent fb6d7e4 commit f9a2ca6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
11 changes: 4 additions & 7 deletions packages/uglify/__tests__/uglify.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ test('Uglify default options work', t => {
test('Uglify options work', t => {
const config = createConfig({}, [
uglify({
parallel: {
workers: 42
}
parallel: 42
})
])

t.truthy(config.plugins[0].options.parallel)
t.deepEqual(config.plugins[0].options.parallel, {
cache: true,
workers: 42
})
t.truthy(config.plugins[0].options.cache)
t.deepEqual(config.plugins[0].options.parallel, 42)
t.deepEqual(config.plugins[0].options.cache, true)
})
5 changes: 2 additions & 3 deletions packages/uglify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ module.exports = uglify
*/
function uglify (options = {}) {
options = webpackMerge({
parallel: {
cache: true
},
parallel: true,
cache: true,
uglifyOptions: {
compress: {
warnings: false
Expand Down
2 changes: 1 addition & 1 deletion packages/uglify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"repository": "andywer/webpack-blocks",
"bugs": "https://github.com/andywer/webpack-blocks/issues",
"dependencies": {
"uglifyjs-webpack-plugin": "^1.0.0-beta",
"uglifyjs-webpack-plugin": "1.0.0-beta.3",
"webpack-merge": "^4.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit f9a2ca6

Please sign in to comment.