Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit 68cc01c

Browse files
1999s-panferov
authored andcommitted
chore: assertion check for webpack version (#584)
1 parent a7d91cb commit 68cc01c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/instance.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ export function ensureInstance(
137137
)
138138
let compiler = <any>webpack._compiler
139139

140+
if (!rootCompiler.hooks) {
141+
throw new Error('It looks like you\'re using an old webpack version without hooks support. ' +
142+
'If you\'re using awesome-script-loader with React storybooks consider ' +
143+
'upgrading @storybook/react to at least version 4.0.0-alpha.3');
144+
}
145+
140146
setupWatchRun(compiler, instanceName)
141147
setupAfterCompile(compiler, instanceName)
142148

0 commit comments

Comments
 (0)