-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# @types/react との競合について storybookjs/storybook#12505 や vuejs/language-tools#592 に言及されている通り @types/react と競合し型エラーが発生する。 対策として @types/react の削除、tsconfig からの stories.ts の除外が考えられるが今回は前者を選択した 理由は @types/react を使用しないことが明確であり、stories.ts にはしっかり tsconfig を適応していからである。
- Loading branch information
Showing
6 changed files
with
7,251 additions
and
148 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ dist | |
dist-ssr | ||
*.local | ||
tsconfig.staged.json | ||
storybook-static |
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,20 @@ | ||
const path = require("path") | ||
const { loadConfigFromFile, mergeConfig } = require("vite"); | ||
|
||
module.exports = { | ||
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: ["@storybook/addon-links", "@storybook/addon-essentials"], | ||
framework: "@storybook/vue3", | ||
core: { | ||
builder: "storybook-builder-vite", | ||
}, | ||
async viteFinal(config, { configType }) { | ||
const { config: userConfig } = await loadConfigFromFile( | ||
path.resolve(__dirname, "../vite.config.ts") | ||
); | ||
return mergeConfig(config, { | ||
...userConfig, | ||
plugins: [], | ||
}); | ||
}, | ||
}; |
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,11 @@ | ||
import "~/scss/main.scss"; | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}; |
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.