Skip to content

Commit

Permalink
fix: upgrade to node 18 (#130)
Browse files Browse the repository at this point in the history
* fix: bump Node from 14 to 18

* fix: remove react-component-component

* fix: bump storybook from 6.4 to 7.6

npx storybook@latest upgrade

* fix: migrate to tsx

- reorganise stories into their categories
- integrate with controls/actions
- use tsx stories instead of mdx
- remove react-frame-component, @storybook/addon-docs (unused dependencies)

* fix: eslint warnings
  • Loading branch information
HJunyuan authored Feb 20, 2024
1 parent 86b993f commit 1a770b5
Show file tree
Hide file tree
Showing 16 changed files with 39,821 additions and 9,172 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.15.0
lts/hydrogen
27 changes: 23 additions & 4 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,27 @@ const toPath = (_path) => path.join(process.cwd(), _path);

module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-essentials"],
framework: "@storybook/react",
core: {
builder: "webpack5",
addons: ["@storybook/addon-essentials", "@storybook/addon-mdx-gfm"],

framework: {
name: "@storybook/react-webpack5",
options: {
builder: {
useSWC: true, // This flag is automatically set by Storybook for all new Webpack5 projects (except Angular) in Storybook 7.6
},
},
},

swc: (config, options) => ({
jsc: {
transform: {
react: {
runtime: "automatic",
},
},
},
}),

webpackFinal: (config) => {
return {
...config,
Expand All @@ -23,4 +39,7 @@ module.exports = {
},
};
},
docs: {
autodocs: true,
},
};
Loading

0 comments on commit 1a770b5

Please sign in to comment.