Skip to content

Commit

Permalink
docs(storybook): vite bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroslavPetrik committed Nov 28, 2023
1 parent 1fe8ed3 commit 83890ef
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 1,360 deletions.
37 changes: 0 additions & 37 deletions .storybook/main.js

This file was deleted.

23 changes: 23 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import tsconfigPaths from "vite-tsconfig-paths";

export default {
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: ["../public"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-styling",
],
framework: { name: "@storybook/react-vite" },
core: {
builder: "@storybook/builder-vite",
disableTelemetry: true,
},
async viteFinal(config) {
return {
...config,
plugins: [...(config.plugins || []), tsconfigPaths()],
};
},
};
2 changes: 1 addition & 1 deletion .storybook/manager.js → .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from "@storybook/addons";
import { addons } from "@storybook/manager-api";
import theme from "./theme";

addons.setConfig({
Expand Down
1 change: 1 addition & 0 deletions .storybook/preview.js → .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "./style.css";
import { DevTools } from "jotai-devtools";
import React from "react";

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@
"@storybook/addon-interactions": "7.6.0",
"@storybook/addon-links": "7.6.0",
"@storybook/addon-styling": "1.3.7",
"@storybook/builder-vite": "^7.6.0",
"@storybook/jest": "0.2.3",
"@storybook/manager-api": "^7.6.0",
"@storybook/react": "7.6.0",
"@storybook/react-webpack5": "7.6.0",
"@storybook/react-vite": "^7.6.0",
"@storybook/testing-library": "0.2.2",
"@storybook/theming": "7.6.0",
"@testing-library/jest-dom": "6.1.4",
Expand Down Expand Up @@ -85,8 +87,8 @@
"semantic-release": "^20.1.0",
"storybook": "7.6.0",
"tailwindcss": "^3.3.5",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "5.3.2",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "0.34.6",
"zod": "^3.22.4"
},
Expand Down
Loading

0 comments on commit 83890ef

Please sign in to comment.