Using render function with template is not working in Vue3 storybook #28755
Replies: 1 comment
-
I figured out that that was due to vue compiler problem. import type { StorybookConfig } from '@storybook/vue3-vite'
import * as path from 'node:path'
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/vue3-vite',
options: {}
},
viteFinal: async (config, { configType }) => {
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, "../src"),
vue: 'vue/dist/vue.esm-bundler.js'
};
return config;
}
}
export default config |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I'm currently working on making reusable components, and trying to apply on storybook (8.2.6).
Now I have trouble with a switch component that should use v-model. I can use that component while applying v-model.
So I want to implement this component into a storybook, but it doesn't work as I expected. I tried to use render function, but it didn't work. The component didn't showed up.
I tried to use render with the tutorial (https://storybook.js.org/docs/api/csf#non-story-exports), but it didn't work neither.
I have no idea why it didn't work. Are there any missing configurations?
Additional information
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions