vue-styleguidist: Styleguide does not work with `sections`

Current behavior

To reproduce

I am using this configuration:

'components': './client/components/**/*.vue',

Change it to this configuration:

'sections': [{
    'name': 'Atoms',
    'sections': [
      { 'components': './client/components/atoms/TButton.vue' },
      { 'components': './client/components/atoms/TInput.vue' }
    ],
  }, {
    'name': 'Molecules',
    'components': [],
  }, {
    'name': 'Organisms',
    'components': [
      './client/components/atoms/TCollapsableMenu.vue',
    ],
  }],

And now all components do not show up. Only white screen is shown.

Expected behavior

I expect it to work the same way.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 22 (14 by maintainers)

Commits related to this issue

Most upvoted comments

There was definitely a big issue here. will be fixed in 3.13.3, VSG was only picking up the first section registered.

Sorry about that

Steps to reproduce:

git clone https://github.com/vue-styleguidist/vue-styleguidist.git
cd vue-styleguidist/examples/sections
npm install
npm run styleguide

Open http://localhost:6060/ in your browser, open the console and observe error messages like:

[Vue warn]: Unknown custom element: <Placeholder> - did you register the component correctly? For recursive components, make sure to provide the “name” option.

Also navigate to the “Placeholder” in the styleguide and observe how the component isn’t being rendered in the styleguide.

Now stop the styleguide server, run:

npm install -D vue-styleguidist@3.12.0
npm run styleguide

Open http://localhost:6060/ in your browser again. Observe how the error messages are gone and the “Placeholder” component gets rendered correctly.

I hope that helps narrowing down the issue. It seems to only happen when sections are being used. Without sections, the error didn’t show even with the latest versions.