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

Assertion check for webpack version #584

Merged
merged 1 commit into from
May 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/instance.ts
Original file line number Diff line number Diff line change
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