Skip to content
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

Remove baseUrl in tsconfig.json #18834

Closed
6 of 15 tasks
xiaoxiangmoe opened this issue Sep 21, 2020 · 5 comments · Fixed by #25934
Closed
6 of 15 tasks

Remove baseUrl in tsconfig.json #18834

xiaoxiangmoe opened this issue Sep 21, 2020 · 5 comments · Fixed by #25934
Labels
area: @schematics/angular feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature needs: investigation Requires some digging to determine if action is needed
Milestone

Comments

@xiaoxiangmoe
Copy link

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/

paths without baseUrl
Using path-mapping is fairly common – often it’s to have nicer imports, often it’s to simulate monorepo linking behavior.

Unfortunately, specifying paths to enable path-mapping required also specifying an option called baseUrl, which allows bare specifier paths to be reached relative to the baseUrl too. This also often caused poor paths to be used by auto-imports.

In TypeScript 4.1, the paths option can be used without baseUrl. This helps avoid some of these issues.

We can remove baseUrl in tsconfig now!

@alan-agius4 alan-agius4 added needs: investigation Requires some digging to determine if action is needed feature Issue that requests a new feature area: @schematics/angular labels Sep 21, 2020
@ngbot ngbot bot added this to the Backlog milestone Sep 21, 2020
@alan-agius4 alan-agius4 marked this as a duplicate of #7964 Oct 22, 2020
@alan-agius4 alan-agius4 marked this as not a duplicate of #7964 Oct 22, 2020
@alan-agius4 alan-agius4 reopened this Oct 22, 2020
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Feb 2, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 2, 2022

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

@ngbot ngbot bot modified the milestones: Backlog, needsTriage Feb 2, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 21, 2022

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

@angular-robot angular-robot bot added feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors and removed feature: votes required Feature request which is currently still in the voting phase labels Feb 21, 2022
@xiaoxiangmoe
Copy link
Author

Can we remove baseUrl in tsconfig.json?
WebStorm and VSCode support it now.

@Gaghyta
Copy link

Gaghyta commented May 7, 2023

Hola, gente. Estoy teniendo muchas dudas (y encontrando muy poca información) sobre el contenido del json de tsconfig. Especialemente se me presentó la duda con el baseUrl del tsconfig.json. Una compañera decidió dejar esos archivos y cada vez que uno se baja cambios se terminan generando conflictos. Miré las diferencias y me encuentro con que su tsconfig.json tiene como baseUrl el valor "./", mientras que yo obtengo la compilación correcta con mi archivo que tiene baseUrl con valor "" (vacío) No sé a qué se debe esta diferencia en la baseUrl y estaba buscando información sobre los usos y consecuencias de la misma.
Agradezco cualquier información que puedan compartir o experiencias personales.

También vi que hay un tema de diferencia en la creación de componentes, en algunos casos se hace automáticamente con el import del Component, y en otros casos con el NgInit. Lo mismo replicado dentro de la class export, en algunos casos está vacía, en otros predeterminada dentro, incluyendo el constructor vacío, el NgInit y el tipo void

Al momento, y habiendo iniciado a utilizar Angular hace nada de tiempo, no llego a entender las diferencias de estas configuraciones a nivel de proyecto y si son un tema del cambio de versión de Angular, o si realmente esto de alguna forma afectaría.

Saludos

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 2, 2023
The `baseUrl` is no longer needed since NGCC has been removed. This also enables better auto-import suggestions.

Closes angular#18834
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 2, 2023
The `baseUrl` is no longer needed since NGCC has been removed. This also enables better auto-import suggestions.

Closes angular#18834
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 2, 2023
The `baseUrl` is no longer needed since NGCC has been removed. This also enables better auto-import suggestions.

Closes angular#18834
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 2, 2023
The `baseUrl` is no longer needed since NGCC has been removed. This also enables better auto-import suggestions.

Closes angular#18834
alan-agius4 added a commit that referenced this issue Oct 2, 2023
The `baseUrl` is no longer needed since NGCC has been removed. This also enables better auto-import suggestions.

Closes #18834
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @schematics/angular feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature needs: investigation Requires some digging to determine if action is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@xiaoxiangmoe @alan-agius4 @Gaghyta and others