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

Footer component will not display in storybook #2

Open
annabarnes1138 opened this issue Feb 25, 2021 · 2 comments
Open

Footer component will not display in storybook #2

annabarnes1138 opened this issue Feb 25, 2021 · 2 comments

Comments

@annabarnes1138
Copy link

It seems to not like the vite-plugin-vue-i18n stuff

image

Steps to reproduce:

  1. Clone repo
  2. use npm or yarn to install dependencies
  3. Change this line to import { isDark, toggleDark } from '../logics' (so that storybook can resolve that path)
  4. Add a stories file for Footer @ .storybook/stories/Footer.stories.js (source below)
import Footer from '../../src/components/Footer.vue'

export default {
  component: Footer,
  title: 'Example/Footer',
};

const Template = (args) => ({
  components: { Footer },
  setup() {
    return { args };
  },
  template: '<Footer />',
});

export const Preview = Template.bind({});
@JohnCampionJr
Copy link
Owner

Yeah, Storybook can't bring in anything that needs Vite plugins to work properly. I mainly integrated it to be able to test and document some stand alone components I'm building for a client. Unless the official storybook ever integrates with vite, this is probably as good as it can get.

@ackushiw-rialtic
Copy link

I've been testing a vite + unocss + storybook integration https://github.com/ackushiw-rialtic/vite-storybook

@stecky My implementation won't fix your issue out of the box but could point you in the right direction

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

3 participants