From c8772230fbde536b0fc6ef8159d2f3e06fbdd7d6 Mon Sep 17 00:00:00 2001 From: snomiao Date: Sat, 16 Aug 2025 06:38:50 +0000 Subject: [PATCH] [fix] Replace __dirname with process.cwd() in Storybook config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit __dirname is not available in all environments. Using process.cwd() provides better compatibility and resolves path issues in Storybook. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .storybook/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.storybook/main.ts b/.storybook/main.ts index 2cbff4a41..a799ec143 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -34,7 +34,7 @@ const config: StorybookConfig = { compiler: 'vue3', customCollections: { comfy: FileSystemIconLoader( - __dirname + '/../src/assets/icons/custom' + process.cwd() + '/src/assets/icons/custom' ) } }), @@ -46,9 +46,9 @@ const config: StorybookConfig = { }) ], dirs: [ - __dirname + '/../src/components', - __dirname + '/../src/layout', - __dirname + '/../src/views' + process.cwd() + '/src/components', + process.cwd() + '/src/layout', + process.cwd() + '/src/views' ], deep: true, extensions: ['vue'] @@ -60,7 +60,7 @@ const config: StorybookConfig = { }, resolve: { alias: { - '@': __dirname + '/../src' + '@': process.cwd() + '/src' } }, build: {