mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-01 05:05:25 +08:00
Merge pull request #8412 from storybookjs/7935-configure-module-check
Core: Check module type in configure
This commit is contained in:
commit
9fba9469b6
@ -440,6 +440,11 @@ export default function start(render, { decorateStory } = {}) {
|
||||
* @param {*} framework - name of framework in use, e.g. "react"
|
||||
*/
|
||||
const configure = (loadable, m, framework) => {
|
||||
if (typeof m === 'string') {
|
||||
throw new Error(
|
||||
`Invalid module '${m}'. Did you forget to pass \`module\` as the second argument to \`configure\`"?`
|
||||
);
|
||||
}
|
||||
if (m && m.hot && m.hot.dispose) {
|
||||
({ previousExports = new Map() } = m.hot.data || {});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user