BaseUrl not respected with new create-react-app 3.0 version
See original GitHub issueDescribe the bug Even better here is a repro case -> https://github.com/SpearThruster/storybook5-and-create-react-app3
To Reproduce
- clone repo
- npm install
- npm run storybook
Expected behavior
The baseUrl should be respected and the component path import { RoundedButton } from "components/RoundedButton"
should be resolved.
Screenshots not applicable
Code snippets If applicable, add code samples to help explain your problem.
System:
- OS: [Windows10]
- Browser: [chrome]
- Framework: [react]
- Version: tried 5.0,0 but also the 5.1.0 alpha version
Additional context Tried various combinations from the docs regarding TypeScript + storybook (with cra) to no avail.
** console output
ERROR in ./src/stories/index.stories.tsx Module not found: Error: Can't resolve 'components/RoundedButton' in 'D:\Projects\storybook5-and-create-react-app3\src\stories' @ ./src/stories/index.stories.tsx 5:0-57 9:29-42 25:29-42 @ ./src sync .stories.tsx$ @ ./.storybook/config.ts @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.ts (webpack)-hot-middleware/client.js?reload=true
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:33 (18 by maintainers)
Top GitHub Comments
Closing this as all issues seem to be resolved. Thanks everyone for your time here 😃