Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

use with vue cause HMR broken #114

Open
yoyoys opened this issue Apr 11, 2019 · 0 comments
Open

use with vue cause HMR broken #114

yoyoys opened this issue Apr 11, 2019 · 0 comments

Comments

@yoyoys
Copy link

yoyoys commented Apr 11, 2019

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant