8000 Update storybook config · codejs-kr/simple-chat@90f1b10 · GitHub
[go: up one dir, main page]

Skip to content

Commit 90f1b10

Browse files
committed
Update storybook config
1 parent 6cf6b93 commit 90f1b10

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

frontend/.storybook/main.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
module.exports = {
2-
stories: ['../stories/**/*.stories.js'],
2+
stories: ['../stories/**/*.stories.js', '../src/**/*.stories.js'],
33
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
4+
webpackFinal: async (config, { configType }) => {
5+
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
6+
// You can change the configuration based on that.
7+
// 'PRODUCTION' is used when building the static version of storybook.
8+
9+
// Make whatever fine-grained changes you need
10+
config.module.rules.push({
11+
test: /\.scss$/,
12+
use: ['style-loader', 'css-loader', 'sass-loader'],
13+
// include: path.resolve(__dirname, '../'),
14+
});
15+
16+
// Return the altered config
17+
return config;
18+
},
419
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import Iphone from './Iphone';
3+
4+
export default {
5+
title: 'components|layout/Iphone', // 스토리북에서 보여질 그룹과 경로를 명시
6+
component: Iphone, // 어떤 컴포넌트를 문서화 할지 명시
7+
};
8+
9+
export const Default = () => <Iphone />;

0 commit comments

Comments
 (0)
0