Replies: 4 comments 5 replies
-
You might want to add a viteFinal instead of webpackFinal, something like this: module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: '@storybook/vue3',
core: {
builder: '@storybook/builder-vite',
},
features: {
storyStoreV7: true,
},
async viteFinal(config, options) {
config.base = '/storybook/'
config.resolve.alias = {
...config.resolve.alias,
'@': '../src',
}
return config
},
} But still, it doesn't fully work. |
Beta Was this translation helpful? Give feedback.
-
Also, I just stumbled upon an alternative that might better suit Vue developers: https://histoire.dev/ 🧐 |
Beta Was this translation helpful? Give feedback.
-
@IanVS I am looking for documentation on differences between
Any help or possible solutions would be much appreciated, as I am running of ideas... |
Beta Was this translation helpful? Give feedback.
-
Something simple like this works for me:
|
Beta Was this translation helpful? Give feedback.
-
I'm trying to make Storybook work within the following scenario:
VueJS 3 + Vite + Storybook
They all have the latest versions installed.
Storybook runs fine but when I add one of my components to it, it throws this error:
It seems that files imported using
@/
are not found.Any idea? I couldn't find any topic that really solves it.
I've tried everything.
Here are some of my configurations:
package.json
vite.config.js
js.config.json
/storybook/main.cjs
/storybook/preview.cjs
<script> of TeamsDataTable.vue component
TeamsDataTable.stories.js
Update
After some research, I've added the following code to a file named
webpack.config.js
within.storybook
directory.It still doesn't work =/ (same error)
Beta Was this translation helpful? Give feedback.
All reactions