feat: text & slider animations
This commit is contained in:
@@ -2,6 +2,26 @@ import type { StorybookConfig } from 'storybook-react-rsbuild';
|
||||
|
||||
/* Dev-only playground. Never shipped — package `files` is ["dist"]. */
|
||||
const config: StorybookConfig = {
|
||||
rsbuildFinal: (config) => {
|
||||
config.tools ??= {};
|
||||
// Append our rule without clobbering storybook-react-rsbuild's own
|
||||
// tools.rspack hook (it injects the storybook-config-entry virtual module
|
||||
// in build mode). Mutate in place and return nothing so its config stays.
|
||||
const prev = config.tools.rspack;
|
||||
config.tools.rspack = [
|
||||
...(Array.isArray(prev) ? prev : prev ? [prev] : []),
|
||||
(rspackConfig) => {
|
||||
rspackConfig.module ??= {};
|
||||
rspackConfig.module.rules ??= [];
|
||||
(rspackConfig.module.rules as unknown[]).push({
|
||||
test: /\.mjs$/,
|
||||
type: 'javascript/auto',
|
||||
resolve: { fullySpecified: false },
|
||||
});
|
||||
},
|
||||
];
|
||||
return config;
|
||||
},
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'],
|
||||
addons: ['@storybook/addon-docs'],
|
||||
staticDirs: ['../src/assets'],
|
||||
|
||||
Reference in New Issue
Block a user