storybook-addon-specifications
storybook-addon-specifications copied to clipboard
use with vue cause HMR broken
Here is my story:
import { storiesOf } from '@storybook/vue';
import { ComponentOptions } from 'vue';
import SomeComponent from './SomeComponent.vue';
import { specs } from 'storybook-addon-specifications';
import test from './some-component.spec';
storiesOf('Form|Project', module)
.add(
'Add Form',
(() => {
const story: ComponentOptions<any> = {
components: {
SomeComponent,
},
data() {
return {
form: {
name: '',
description: '',
},
};
},
template: `
<div class="default-view">
<h3>form: {{ form }}</h3>
<hr/>
<SomeComponent v-model="form" />
</div>
`,
};
specs(() => test);
return story;
}),
);
if I remove specs(() => test);
, HMR works as except.
if don't, HMR only works on style update.