Skip to content

Commit

Permalink
Disable optimization for webpack 4 (Fixes codymikol#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottohara committed May 5, 2018
1 parent 1ac16ea commit dc71a33
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 @@ -67,6 +67,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 dc71a33

Please sign in to comment.