Skip to content

Commit

Permalink
fix(karma-webpack): disable optimization by default (`webpack >= v4…
Browse files Browse the repository at this point in the history
….0.0`) (#325)
  • Loading branch information
scottohara authored and michael-ciniawsky committed Aug 29, 2018
1 parent 9ca87d4 commit a225109
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/karma-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ function Plugin(
webpackOptions.output.jsonpFunction = `webpackJsonp${index}`
}
webpackOptions.output.chunkFilename = '[id].bundle.js'

// For webpack 4+, optimization.splitChunks and optimization.runtimeChunk must be false.
// Otherwise it hangs at 'Compiled successfully'
if (webpackOptions.optimization) {
webpackOptions.optimization.splitChunks = false
webpackOptions.optimization.runtimeChunk = false
}
})

this.emitter = emitter
Expand Down

0 comments on commit a225109

Please sign in to comment.