Skip to content

Commit

Permalink
build: configure storybook to use babel for compilation
Browse files Browse the repository at this point in the history
Previously, we used SWC for compiling code for Storybook. However, this didn't
respect our compiler settings. This change replaces SWC with babel, ensuring
Storybook uses the same compiler settings as the production build, providing
more consistent behaviour
  • Loading branch information
Parsium committed Dec 11, 2024
1 parent 434f3e7 commit 0e4e9f0
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const config: StorybookConfig = {
},
"@storybook/addon-toolbars",
"@storybook/addon-viewport",
"@storybook/addon-webpack5-compiler-swc",
"@chromatic-com/storybook",
"@storybook/addon-webpack5-compiler-babel",
],

staticDirs: ["../.assets", "../logo"],
Expand Down
212 changes: 191 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@storybook/addon-docs": "^8.3.3",
"@storybook/addon-toolbars": "^8.3.3",
"@storybook/addon-viewport": "^8.3.3",
"@storybook/addon-webpack5-compiler-swc": "^1.0.4",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/components": "^8.3.3",
"@storybook/manager-api": "^8.3.3",
"@storybook/preview-api": "^8.3.3",
Expand Down

0 comments on commit 0e4e9f0

Please sign in to comment.