Skip to content

Commit bdd8c80

Browse files
goldhandjoshwiens
authored andcommitted
feat(webpack): add support for [email protected]
- Fixes the error that webpack 2.1.0-beta.7 will throw if not entry or plugins are specified in options.= - Update peer dependencies for [email protected]
1 parent 7334dbc commit bdd8c80

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

index.js

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ function Plugin(
2424
// The webpack tier owns the watch behavior so we want to force it in the config
2525
webpackOptions.watch = true;
2626

27+
// Webpack 2.1.0-beta.7+ will throw in error if both entry and plugins are not specified in options
28+
// https://github.com/webpack/webpack/commit/b3bc5427969e15fd3663d9a1c57dbd1eb2c94805
29+
if(!webpackOptions.entry) webpackOptions.entry = {};
30+
2731
if(!webpackOptions.output) webpackOptions.output = {};
2832

2933
// When using an array, even of length 1, we want to include the index value for the build.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"author": "Tobias Koppers @sokra",
55
"description": "Use webpack with karma",
66
"peerDependencies": {
7-
"webpack": "^1.4.0"
7+
"webpack": "^1.4.0 || ^2 || ^2.1.0-beta"
88
},
99
"dependencies": {
1010
"async": "~0.9.0",

0 commit comments

Comments
 (0)