storybook-addon-specifications icon indicating copy to clipboard operation
storybook-addon-specifications copied to clipboard

use with vue cause HMR broken

Open yoyoys opened this issue 5 years ago • 0 comments

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.

yoyoys avatar Apr 11 '19 05:04 yoyoys