storybook-vue-csf-addon
该项目最初是 storybook-vue-addon
的一个分支
🚧 正在开发中 🚧
安装
npm i -D storybook-vue-csf-addon
// vite.config.ts
import Starter from 'storybook-vue-csf-addon/vite'
export default defineConfig({
plugins: [
Starter({ /* options */ }),
],
})
示例:playground/
// rollup.config.js
import Starter from 'storybook-vue-csf-addon/rollup'
export default {
plugins: [
Starter({ /* options */ }),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('storybook-vue-csf-addon/webpack')({ /* options */ })
]
}
// nuxt.config.js
export default defineNuxtConfig({
modules: [
['storybook-vue-csf-addon/nuxt', { /* options */ }],
],
})
此模块适用于 Nuxt 2 和 Nuxt Vite
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('storybook-vue-csf-addon/webpack')({ /* options */ }),
],
},
}
// esbuild.config.js
import { build } from 'esbuild'
import Starter from 'storybook-vue-csf-addon/esbuild'
build({
plugins: [Starter()],
})