feat: text & slider animations

This commit is contained in:
2026-06-02 12:18:26 +03:00
parent 4919bc26e5
commit 49d6ac8a4e
4 changed files with 392 additions and 13 deletions
+20
View File
@@ -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'],