mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
[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:
@@ -34,7 +34,7 @@ const config: StorybookConfig = {
|
|||||||
compiler: 'vue3',
|
compiler: 'vue3',
|
||||||
customCollections: {
|
customCollections: {
|
||||||
comfy: FileSystemIconLoader(
|
comfy: FileSystemIconLoader(
|
||||||
__dirname + '/../src/assets/icons/custom'
|
process.cwd() + '/src/assets/icons/custom'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -46,9 +46,9 @@ const config: StorybookConfig = {
|
|||||||
})
|
})
|
||||||
],
|
],
|
||||||
dirs: [
|
dirs: [
|
||||||
__dirname + '/../src/components',
|
process.cwd() + '/src/components',
|
||||||
__dirname + '/../src/layout',
|
process.cwd() + '/src/layout',
|
||||||
__dirname + '/../src/views'
|
process.cwd() + '/src/views'
|
||||||
],
|
],
|
||||||
deep: true,
|
deep: true,
|
||||||
extensions: ['vue']
|
extensions: ['vue']
|
||||||
@@ -60,7 +60,7 @@ const config: StorybookConfig = {
|
|||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': __dirname + '/../src'
|
'@': process.cwd() + '/src'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
|||||||
Reference in New Issue
Block a user