Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pug templates seem to not be supported #86

Open
sneko opened this issue Sep 8, 2018 · 4 comments
Open

Pug templates seem to not be supported #86

sneko opened this issue Sep 8, 2018 · 4 comments

Comments

@sneko
Copy link

sneko commented Sep 8, 2018

Hi!

When I run the plugin on my Vue.js components, it fails when parsing the template:

ERROR in ./src/views/Home.vue?vue&type=template&id=fae5bece&lang=pug& (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Home.vue?vue&type=template&id=fae5bece&lang=pug&)
Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
(Emitted value instead of an instance of Error)
  Error compiling template:

  .onboarding.background-blue
    .wrapper(padding='')
         // Removed the rest to keep the sample clean

  - Component template requires a root element, rather than just text.

 @ ./src/views/Home.vue?vue&type=template&id=fae5bece&lang=pug& 1:0-211 1:0-211
 @ ./src/views/Home.vue
 @ ./src/stories/index.stories.js
 @ ./src/stories sync .stories.js$
 @ ./config/storybook/config.js
 @ multi ./node_modules/@storybook/core/dist/server/config/polyfills.js ./node_modules/@storybook/core/dist/server/config/globals.js ./config/storybook/config.js ./node_modules/webpack-hot-middleware/client.js?reload=true

Do you know what's missing to take in account Pug loader? I don't understand why it doesn't work because when I run Storybook on its own it works well...

Thank you,

@theKashey
Copy link
Contributor

This issue is related to storybook, not to storybook-chrome-screenshot which just runs it.

@sneko
Copy link
Author

sneko commented Sep 17, 2018

@theKashey, are you sure? My components are well displayed in Storybook :/

@theKashey
Copy link
Contributor

Absolutely. This library just runs storybook and next open it in headless browser. Nothing more.

@sneko
Copy link
Author

sneko commented Sep 17, 2018

@theKashey thank you for the information. I don't understand why there is a difference between reaching directly Storybook and by storybook-chrome-screenshot 😢

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

No branches or pull requests

2 participants