mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-21 05:02:39 +08:00
Merge pull request #1525 from storybooks/hmr-warning-on-storiesOf
Add warning when module is missing in storiesOf
This commit is contained in:
commit
949f62f08c
@ -34,6 +34,13 @@ export default class ClientApi {
|
||||
throw new Error('Invalid or missing kind provided for stories, should be a string');
|
||||
}
|
||||
|
||||
if (!m) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
`Missing 'module' parameter for story with a kind of '${kind}'. It will break your HMR`
|
||||
);
|
||||
}
|
||||
|
||||
if (m && m.hot) {
|
||||
m.hot.dispose(() => {
|
||||
this._storyStore.removeStoryKind(kind);
|
||||
|
@ -30,6 +30,10 @@ export default class ClientApi {
|
||||
throw new Error('Invalid or missing kind provided for stories, should be a string');
|
||||
}
|
||||
|
||||
if(!m) {
|
||||
console.warn(`Missing 'module' parameter for story with a kind of '${kind}'. It will break your HMR`);
|
||||
}
|
||||
|
||||
if (m && m.hot) {
|
||||
m.hot.dispose(() => {
|
||||
this._storyStore.removeStoryKind(kind);
|
||||
|
@ -33,7 +33,6 @@
|
||||
"react-komposer": "^2.0.0",
|
||||
"react-modal": "^1.7.7",
|
||||
"react-split-pane": "^0.1.63",
|
||||
"react-split-pane": "^0.1.65",
|
||||
"redux": "^3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user