diff --git a/apps/web/.storybook/main.ts b/apps/web/.storybook/main.ts index ce92a05..a94b5f5 100644 --- a/apps/web/.storybook/main.ts +++ b/apps/web/.storybook/main.ts @@ -1,4 +1,4 @@ -const path = require('path') +const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin') /** @type { import('@storybook/nextjs').StorybookConfig } */ const config = { @@ -18,6 +18,11 @@ const config = { }, }, ], + staticDirs: ['../public'], + webpackFinal: async (config, { configType }) => { + config.resolve.plugins = [new TsconfigPathsPlugin()] + return config + }, framework: { name: '@storybook/nextjs', options: {}, diff --git a/apps/web/package.json b/apps/web/package.json index 7b2e760..7c82a6b 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -57,6 +57,7 @@ "storybook-dark-mode": "^3.0.1", "storybook-tailwind-dark-mode": "^1.0.22", "tailwindcss": "3.3.2", - "tsconfig": "*" + "tsconfig": "*", + "tsconfig-paths-webpack-plugin": "^4.1.0" } } diff --git a/apps/web/src/stories/pages/Profile.stories.tsx b/apps/web/src/stories/pages/Profile.stories.tsx new file mode 100644 index 0000000..93a02a6 --- /dev/null +++ b/apps/web/src/stories/pages/Profile.stories.tsx @@ -0,0 +1,20 @@ +import type { Meta, StoryObj } from '@storybook/react' + +import { default as Profile$1 } from '../../app/profile/[id]/page' + +const meta = { + title: 'Pages/Profile', + component: Profile$1, + parameters: { + nextjs: { + appDirectory: true, + }, + }, +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Profile: Story = { + args: {}, +} diff --git a/package-lock.json b/package-lock.json index 3f50ead..e2bcb3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -97,7 +97,8 @@ "storybook-dark-mode": "^3.0.1", "storybook-tailwind-dark-mode": "^1.0.22", "tailwindcss": "3.3.2", - "tsconfig": "*" + "tsconfig": "*", + "tsconfig-paths-webpack-plugin": "^4.1.0" } }, "node_modules/@80000coding/ui": {