Merge pull request #32180 from backstage/storybook-mcp
Add Storybook MCP
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// This file has been automatically migrated to valid ESM format by Storybook.
|
||||
import { defineMain } from '@storybook/react-vite/node';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { createRequire } from 'node:module';
|
||||
@@ -49,11 +50,16 @@ export default defineMain({
|
||||
getAbsolutePath('@storybook/addon-docs'),
|
||||
getAbsolutePath('@storybook/addon-a11y'),
|
||||
getAbsolutePath('@storybook/addon-vitest'),
|
||||
getAbsolutePath('@storybook/addon-mcp'),
|
||||
],
|
||||
framework: {
|
||||
name: getAbsolutePath('@storybook/react-vite'),
|
||||
options: {},
|
||||
},
|
||||
features: {
|
||||
experimentalComponentsManifest: true,
|
||||
experimentalCodeExamples: true, // optional
|
||||
},
|
||||
viteFinal: async (config, { configType }) => {
|
||||
// Add Node.js polyfills for browser compatibility
|
||||
//
|
||||
|
||||
@@ -21,6 +21,7 @@ import './storybook.css';
|
||||
import './themes/spotify.css';
|
||||
|
||||
export default definePreview({
|
||||
tags: ['manifest'],
|
||||
globalTypes: {
|
||||
themeMode: {
|
||||
name: 'Theme Mode',
|
||||
@@ -107,6 +108,13 @@ export default definePreview({
|
||||
// 'dark spotify': allModes['dark spotify'],
|
||||
},
|
||||
},
|
||||
|
||||
a11y: {
|
||||
// 'todo' - show a11y violations in the test UI only
|
||||
// 'error' - fail CI on a11y violations
|
||||
// 'off' - skip a11y checks entirely
|
||||
test: 'todo',
|
||||
},
|
||||
},
|
||||
|
||||
decorators: [
|
||||
|
||||
Reference in New Issue
Block a user