fix: Fix containing various changes that stacked up in a period of time (#22)
This commit is contained in:
1 parent
1b3d7cecb2
commit
77afcca98e
163 files changed
+4268
-3852
No files matched your search
@@ -0,0 +1,55 @@
|
||||
import { pluginBabel } from '@rsbuild/plugin-babel';
|
||||
import { resolve } from 'path';
|
||||
import type { StorybookConfig } from 'storybook-react-rsbuild';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ['../../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
||||
addons: [
|
||||
'@storybook/addon-essentials',
|
||||
'@storybook/addon-interactions',
|
||||
'@storybook/addon-a11y',
|
||||
'@storybook/addon-themes',
|
||||
],
|
||||
framework: {
|
||||
name: 'storybook-react-rsbuild',
|
||||
options: {},
|
||||
},
|
||||
typescript: {
|
||||
check: false,
|
||||
reactDocgen: 'react-docgen-typescript',
|
||||
reactDocgenTypescriptOptions: {
|
||||
shouldExtractLiteralValuesFromEnum: true,
|
||||
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
||||
},
|
||||
},
|
||||
rsbuildFinal: (config) => {
|
||||
config.resolve = config.resolve || {};
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
'@ermnvldmr/stl': resolve(__dirname, '../../stl/src'),
|
||||
'@ermnvldmr/ui': resolve(__dirname, '../../ui/src'),
|
||||
};
|
||||
|
||||
config.plugins = config.plugins || [];
|
||||
config.plugins.push(
|
||||
pluginBabel({
|
||||
include: /\.(?:jsx|tsx)$/,
|
||||
exclude: /[\\/]node_modules[\\/]/,
|
||||
babelLoaderOptions: (opts) => {
|
||||
opts.plugins = opts.plugins || [];
|
||||
opts.plugins.push([
|
||||
'babel-plugin-istanbul',
|
||||
{
|
||||
exclude: ['**/*.stories.tsx', '**/*.test.tsx', 'node_modules/**'],
|
||||
extension: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
]);
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,15 @@
|
||||
import type { Preview } from '@storybook/react';
|
||||
import '../../../ui/src/static/styles.css';
|
||||
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default preview;
|
||||
Reference in new issue
Block a user