-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade storybook to V8 (#149)
* Update dependencies and configure Storybook * Update @nx/storybook version to 19.1.0 --------- Co-authored-by: Yucong Jin <[email protected]>
- Loading branch information
Showing
4 changed files
with
1,633 additions
and
1,901 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
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,20 +1,36 @@ | ||
import { dirname, join } from "path"; | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/stories/**/*.stories.@(js|jsx|ts|tsx|mdx)"], | ||
addons: ["@storybook/addon-essentials", "@storybook/addon-interactions"], | ||
stories: ["../src/stories/**/*.@(mdx|stories.@(js|jsx|ts|tsx))"], | ||
addons: [ | ||
getAbsolutePath("@storybook/addon-essentials"), | ||
getAbsolutePath("@storybook/addon-interactions"), | ||
"@chromatic-com/storybook", | ||
], | ||
|
||
framework: { | ||
name: "@storybook/react-vite", | ||
name: getAbsolutePath("@storybook/react-vite"), | ||
options: { | ||
builder: { | ||
viteConfigPath: "vite.config.ts", | ||
}, | ||
}, | ||
}, | ||
|
||
docs: {}, | ||
|
||
typescript: { | ||
reactDocgen: "react-docgen-typescript", | ||
}, | ||
}; | ||
|
||
export default config; | ||
|
||
// To customize your Vite configuration you can use the viteFinal field. | ||
// Check https://storybook.js.org/docs/react/builders/vite#configuration | ||
// and https://nx.dev/recipes/storybook/custom-builder-configs | ||
|
||
function getAbsolutePath(value: string): any { | ||
return dirname(require.resolve(join(value, "package.json"))); | ||
} |
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 @@ | ||
export const tags = ["autodocs"]; |
Oops, something went wrong.