nuxt 3 component witdh storybook no components found
See original GitHub issue[unplugin-vue-components] no components found
const path = require('path')
const Components = require('unplugin-vue-components/vite')
const AutoImport = require('unplugin-auto-import/vite')
const { loadConfigFromFile, mergeConfig } = require('vite')
module.exports = {
stories: [
'../stories/**/*.stories.mdx',
'../stories/**/*.stories.ts',
'../components/**/*.stories.ts',
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'storybook-dark-mode',
{
name: '@storybook/addon-postcss',
options: {
cssLoaderOptions: {
importLoaders: 1,
},
postcssLoaderOptions: {
implementation: require('postcss'),
}
}
}
],
core: {
builder: 'storybook-builder-vite'
},
async viteFinal(config, { configType }) {
config.plugins = config.plugins ?? []
config.plugins.push(AutoImport({
imports: [
'vue',
'vue-router',
],
dts: '.nuxt/auto-imports.d.ts',
}))
config.plugins.push(Components({
extensions: ['vue'],
include: [/\.vue$/, /\.vue\?vue/],
dts: '.nuxt/components.d.ts',
}))
return {
...config,
resolve: {
alias: {
'@': `${path.resolve(__dirname, '..')}/`,
'@/': `${path.resolve(__dirname, '..')}/`,
'vue': 'vue/dist/vue.esm-bundler.js',
},
}
}
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Storybook / Nuxt 3 with script setup component - Stack Overflow
I'm not using any of those plugins, it's Nuxt (3.0.0) that auto imports stuff. The idea is to do it without touching the...
Read more >An (almost) comprehensive guide on using ... - Medium
A guide on getting Storybook to work with the Nuxt.js framework.
Read more >Importing and Using Components in Nuxt 3 - Server Side Up
When migrating from Nuxt 2 to Nuxt 3, components are now imported and used through auto imports instead of explicit importing.
Read more >Wire in data - Storybook Tutorials
Wire in data. Learn how to wire in data to your UI component. So far, we have created isolated stateless components-–great for Storybook,...
Read more >Document & Test Vue 3 Components With Storybook
Storybook is my tool of choice for UI component documentation. ... Unfortunately, I found no way to add JSDoc comments to the counter-update ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No