-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
baseUrl not support '.' #6850
Comments
Like the message says support for |
I think the question was about why the support is limited to these values. Seems like a legit question. |
Support for aliases in the roadmap, but importing files outside of |
We've limited |
I think setting the base url to "." is safer than setting it to "src". |
Fair point, but the downside is that it can cause confusion making people think you can import source files from outside |
I am one of those who were using
I understand why you made this change but the truth is that So my question is: is there a way to keep my imports with src with the current CRA 3 (without ejecting)? |
I have to take the workaround:
{
"compilerOptions": {
"baseUrl": "."
}
}
Waiting for cra aliases or tsconfig paths supported |
@rovansteen, as the fine engineer I'm sure you are ... aren't you offended on some level that people are having to resort to this? I don't really mean offended, but In the way that all good engineers are offended by bad solutions when a good one is possible (even if the bad ones aren't that much harder)? Don't you want developers preventing issues such as Bob creating Couldn't any sort of pre-alias solution, like allowing a third valid P.S. The longer there's no solution, the more teams will just opt to use |
I think there is already protection in place against importing files outside of the Aliases turned out to be quite difficult to implement as the Typescript implementation is very different from Webpack. So if this would tackle the most requested need for aliases that might be a better option, at least for now. What do you think @iansu? |
Setting Please note that there is still a limitation that you can only import files from |
Is this a bug report?
Maybe
Version:
react-scripts: 3.0.0-next.68
Error info:
tsconfig
Question:
Why is
baseUrl
currently limited tosrc
ornode_modules
?The text was updated successfully, but these errors were encountered: