mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-26 13:31:45 +03:00
be20a690b3
Fixes: #6436 Changes made: - Added typecheck step before twenty-ui build to check stories TS errors - Added a tsconfig.dev.json to add stories and tests to typecheking when in dev mode - Added tsconfig.dev.json to storybook dev command of twenty-ui to typecheck stories while developing - Fixed twenty-ui stories that were broken - Added a serve command to serve front build - Fixed unit test from another PR --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { StorybookConfig } from '@storybook/react-vite';
|
|
import * as path from 'path';
|
|
import checker from 'vite-plugin-checker';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
|
addons: [
|
|
'@storybook/addon-links',
|
|
'@storybook/addon-essentials',
|
|
'@storybook/addon-onboarding',
|
|
'@storybook/addon-interactions',
|
|
'@storybook/addon-coverage',
|
|
'storybook-dark-mode',
|
|
'storybook-addon-cookie',
|
|
'storybook-addon-pseudo-states',
|
|
],
|
|
framework: {
|
|
name: '@storybook/react-vite',
|
|
options: {},
|
|
},
|
|
viteFinal: (config) => {
|
|
return {
|
|
...config,
|
|
plugins: [
|
|
...(config.plugins ?? []),
|
|
checker({
|
|
typescript: {
|
|
tsconfigPath: path.resolve(__dirname, '../tsconfig.dev.json'),
|
|
},
|
|
}),
|
|
],
|
|
};
|
|
},
|
|
};
|
|
|
|
export default config;
|
|
|
|
// To customize your Vite configuration you can use the viteFinal field.
|
|
// Check https://storybook.js.org/docs/react/builders/vite#configuration
|
|
// and https://nx.dev/recipes/storybook/custom-builder-configs
|