-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: storybook removed from ui package
- Loading branch information
1 parent
c19e273
commit 1474b4f
Showing
19 changed files
with
5,108 additions
and
1,213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,23 @@ | ||
import type { StorybookConfig } from "@storybook/react-webpack5"; | ||
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin"; | ||
import viteTsconfig from "vite-tsconfig-paths"; | ||
import { resolve } from "path"; | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-webpack5-compiler-swc", | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@chromatic-com/storybook", | ||
"@storybook/addon-interactions", | ||
"@storybook/addon-themes", | ||
// { | ||
// /** | ||
// * Fix Storybook issue with PostCSS@8 | ||
// * @see https://github.com/storybookjs/storybook/issues/12668#issuecomment-773958085 | ||
// */ | ||
// //postcss를 활용할 수 있도록 이 부분 추가. | ||
// name: "@storybook/addon-postcss", | ||
// options: { | ||
// postcssLoaderOptions: { | ||
// implementation: require("postcss"), | ||
// }, | ||
// }, | ||
// }, | ||
{ | ||
name: "@storybook/addon-styling-webpack", | ||
options: { | ||
rules: [ | ||
// Replaces existing CSS rules with given rule | ||
{ | ||
test: /\.css$/, | ||
use: ["style-loader", "css-loader"], | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {}, | ||
framework: "@storybook/react-vite", | ||
stories: ["../stories/*.stories.tsx", "../stories/**/*.stories.tsx"], | ||
core: { | ||
builder: "@storybook/builder-vite", | ||
}, | ||
swc: (config, options) => ({ | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: "automatic", | ||
}, | ||
}, | ||
}, | ||
}), | ||
webpackFinal: async (config, { configType }) => { | ||
if (config && config.resolve) { | ||
config.resolve.plugins = [new TsconfigPathsPlugin()]; | ||
} | ||
return config; | ||
async viteFinal(config) { | ||
const { mergeConfig } = await import("vite"); | ||
|
||
return mergeConfig(config, { | ||
plugins: [ | ||
viteTsconfig({ | ||
projects: [resolve(__dirname, "../../../packages/ui/")], | ||
}), | ||
], | ||
}); | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { Preview } from "@storybook/react"; | ||
import "@noowah/content-builder/styles.css"; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.