Coder Social home page Coder Social logo

storybook-mdx-vue-example's Introduction

trevoreyre.com

Personal website for Trevor Eyre

storybook-mdx-vue-example's People

Contributors

lucasvst avatar trevoreyre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

storybook-mdx-vue-example's Issues

Config in main.js not loading .js stories.

I am using storybook with a Nuxt project.
I have used your config in main.js to load mdx files but now it isn't loading .js files.
Here are the config files: https://gist.github.com/yasgreen93/3e7e195507c5ed1255fa588df02840aa

My folder structure is like so:

.storybook
  ...config files...

components
  Button
    Button.vue
    Button.stories.mdx
  BaseImage
   BaseImage.vue
   BaseImage.stories.js

stories
  intro.stories.js

Running yarn storybook, everything runs well.
However running yarn build-storybook && npx http-server storybook-static only builds the mdx files.

Can you see if I am missing anything?

Nuxt usage

Hi!

Thanks for putting this example out there. I'm using Nuxt and I'm trying to implement this code into my own project, but I get this jsx error:

WARNING in ./components/stories/Button.stories.mdx 4:0
Module parse failed: Unexpected token (4:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import Button from '@/components/Button'
|
> <Meta title="Button Docs" component={Button} />
|
| # Button Docs
 @ \.)(?=.)[^\/]*?\.stories\.(js|mdx))$ (./components/stories sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(js|mdx))$) ./Button.stories.mdx
 @ ./.storybook/generated-entry.js
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/preview.js ./.storybook/generated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true

Any suggestions? Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.