-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storybook v6 -> v7 #1214
storybook v6 -> v7 #1214
Changes from 1 commit
8f223db
e163e8a
c296170
a9d43dd
c4cb735
26539a3
9343a2f
0046dcd
d35f9c5
95aca61
8beb2c1
99f1d5f
79fd3fa
a2be965
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"sourceType": "unambiguous", | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"chrome": 100 | ||
} | ||
} | ||
], | ||
"@babel/preset-typescript", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
[ | ||
"@babel/plugin-proposal-class-properties", | ||
{ | ||
"loose": true | ||
} | ||
] | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,25 @@ module.exports = { | |
"@storybook/addon-essentials", | ||
"@storybook/addon-links", | ||
"@storybook/addon-storysource", | ||
"@storybook/addon-postcss", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v7では使えなさそう そもそもPostCSS使いたくていれたものじゃなさそう There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ref: #1226 |
||
{ | ||
// MEMO: included in addon-essentials | ||
name: "@storybook/addon-docs", | ||
options: { | ||
sourceLoaderOptions: { | ||
csfPluginOptions: { | ||
injectStoryParameters: false, | ||
}, | ||
Comment on lines
14
to
17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @takurinton |
||
}, | ||
}, | ||
"@storybook/addon-mdx-gfm", | ||
], | ||
reactOptions: { | ||
// TODO: fix warn "Rendered more hooks than during the previous render." | ||
// strictMode: true, | ||
features: { | ||
babelModeV7: true, | ||
}, | ||
babel: async (options) => ({ | ||
...options, | ||
plugins: [["@babel/plugin-proposal-class-properties", { loose: true }]], | ||
}), | ||
core: { | ||
builder: "webpack5", | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import * as React from "react"; | ||
import { ThemeProvider, createTheme } from "../src/themes"; | ||
import "@storybook/addon-console"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v7対応されなそう 必要か判断した上で、代替手段を要調査 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
const theme = createTheme(); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v7からは.babelrcを作ってそれを読むようになるっぽい
https://storybook.js.org/docs/react/configure/babel#v7-mode