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

Commit

Permalink
chore: assertion check for webpack version (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
1999 authored and s-panferov committed May 28, 2018
1 parent a7d91cb commit 68cc01c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/instance.ts
Expand Up @@ -137,6 +137,12 @@ export function ensureInstance(
)
let compiler = <any>webpack._compiler

if (!rootCompiler.hooks) {
throw new Error('It looks like you\'re using an old webpack version without hooks support. ' +
'If you\'re using awesome-script-loader with React storybooks consider ' +
'upgrading @storybook/react to at least version 4.0.0-alpha.3');
}

setupWatchRun(compiler, instanceName)
setupAfterCompile(compiler, instanceName)

Expand Down

0 comments on commit 68cc01c

Please sign in to comment.