Open
Description
Describe the bug
'core' build process uses the replace method which causes things to fail if the storybook repo is in a path with 'src' above it on the local hard drive.
Reproduction link
Can't using storybook.new because its a pathing issue
Reproduction steps
- Clone storybook repo in ~/src/storybook
- Run yarn start
You will receive a build error and some files will be built to ~/dist/
This appears to be because of the use of .replace('src', 'dist') throughout some of the core prepare scripts against entry files. .replace
will replace the first occurrence of 'src' with 'dist'.
To fix .replace should be replaced with a utility function the replaces last occurrence of 'src' with 'dist'
System
N/A
Additional context
No response