Skip to content

Commit

Permalink
[fix] Storybook bundling bug with Babel/TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Jan 30, 2024
1 parent 0a6e2eb commit 70311ea
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ api-extractor.json
stories/
.storybook/
storybook-static/
.vscode/settings.json
.vscode/
.husky/
.github/
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "idea-react",
"version": "2.0.0-rc.0",
"version": "2.0.0-rc.1",
"license": "LGPL-3.0-or-later",
"author": "[email protected]",
"description": "A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.",
Expand Down Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/preset-typescript": "^7.23.3",
"@microsoft/api-extractor": "^7.39.4",
"@parcel/config-default": "~2.11.0",
"@parcel/packager-ts": "~2.11.0",
Expand Down
21 changes: 10 additions & 11 deletions pnpm-lock.yaml

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

12 changes: 11 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ export default defineConfig(({ mode }) => {
plugins: [
react({
babel: {
presets: [['@babel/preset-env']],
presets: [
[
'@babel/preset-typescript',
{
allowDeclareFields: true,
allowNamespaces: true,
allExtensions: true,
isTSX: true
}
]
],
plugins: [
[
'@babel/plugin-proposal-decorators',
Expand Down

1 comment on commit 70311ea

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for idea-react ready!

✅ Preview
https://idea-react-5g20o6f1j-stevending1st.vercel.app

Built with commit 70311ea.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.