baseUrl not support '.'
See original GitHub issueIs this a bug report?
Maybe
Version:
react-scripts: 3.0.0-next.68
Error info:
Your project’s
baseUrl
can only be set tosrc
ornode_modules
. Create React App does not support other values at this time.
tsconfig
{
"compilerOptions": {
...,
"baseUrl": "."
},
}
Question:
Why is baseUrl
currently limited to src
or node_modules
?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:11 (7 by maintainers)
Top Results From Across the Web
paths & baseUrl is not supported in typescript? #16088 - GitHub
I've tried to set up a simple typescript project using the paths and baseUrl path mapping to create shortcuts to folders. Everything seemed...
Read more >Configuration - Cypress Documentation
This guide is for Cypress 10 and the new JavaScript configuration file format. If you are on an older version of Cypress that...
Read more >The Document Base URL element - HTML - MDN Web Docs
The HTML element specifies the base URL to use for all relative URLs in a document. There can be only one element in...
Read more >{{ site.BaseURL | absLangURL }} not working - support - HUGO
HI I have trouble adding the LANG at the end of a URL My config.yaml baseURL: "" languageCode: en-us title: YES theme: toha...
Read more >jsconfig.json baseUrl is not supported : WEB-43061 - YouTrack
Current solution is to mark desired directories as "resource root". My main issue here is that all projects have either tsconfig.json or jsconfig.json,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think setting the base url to “.” is safer than setting it to “src”. Imagine you have a file like named “src/react/index.js/ts” (or named like some other famous library) for some reason By setting the baseUrl to “src” you’d need to do
import ... from "react"
, which might lead to confusion. If the baseUrl is set to ‘.’ it would beimport ... from "src/react"
, which is less confusing and less likely to have name clashing.I think the question was about why the support is limited to these values. Seems like a legit question.