[fix] Replace __dirname with process.cwd() in Storybook config

__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 <noreply@anthropic.com>
This commit is contained in:
snomiao
2025-08-16 06:38:50 +00:00
parent 171d0960ef
commit c8772230fb

View File

@@ -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: {