storybook
storybook copied to clipboard
[Bug]: Can't get Storybook to work with typescript-plugin-css-modules using SCSS #12464
Describe the bug
Styles are not loaded into the storybook where style named export is used Example of story:
// index.stories.tsx
import { ComponentStory, ComponentMeta } from '@storybook/react';
import './style.module.scss';
import { Button } from '.';
export default {
title: 'shared/Button',
component: Button,
argTypes: {
theme: {
description: 'Вариант цветовой темы для кнопки',
defaultValue: 'primary',
options: [
'primary',
'transparent_default',
'white',
'second',
'small',
'small_active',
'text', 'back',
'mini_icon',
'big_icon'
],
control: {
type: 'radio'
}
},
children: {
name: 'label',
control: 'Text',
description: 'Текст внутри кнопки',
defaultValue: 'Открыть страницу профиля'
},
className: {
description: 'Дополнительный класс для кнопки'
},
icon: {
description: 'Иконка в кнопке'
}
}
} as ComponentMeta<typeof Button>;
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
export const Default = Template.bind({});
my main.js file:
module.exports = {
stories: [
'../../src/**/*.stories.mdx',
'../../src/**/*.stories.@(js|jsx|ts|tsx)'
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions'
],
framework: '@storybook/react',
core: {
builder: '@storybook/builder-webpack5'
}
};
To Reproduce
No response
System
No response
Additional context
No response
@Integrayshaun is this something you can help out with?
Hey @spice2445 👋
Can you share a repro of your project with me so that I can dig in?