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

[vue-ts] incorrect warning about missing baseUrl in extended tsconfig.json #3758

Closed
6 tasks done
JounQin opened this issue Jun 11, 2021 · 5 comments
Closed
6 tasks done

Comments

@JounQin
Copy link
Contributor

JounQin commented Jun 11, 2021

Describe the bug

baseUrl is already set in the project level tsconfig.json: https://github.com/JounQin/test/blob/vite/tsconfig.json#L4

The warning means vite is consuming the original tsconfig from node_modules, this is incorrect.

Reproduction

https://github.com/JounQin/test/tree/vite

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

  System:
    OS: macOS 12.0
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 23.45 GB / 64.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.12 - ~/.nvm/versions/node/v12.22.1/bin/npm
  npmPackages:
    @vitejs/plugin-vue: ^1.2.3 => 1.2.3 
    vite: ^2.3.7 => 2.3.7

Used package manager: yarn

Logs

node_modules/@1stg/tsconfig/app.json:12:8: warning: Non-relative path "src/*" is not allowed when "baseUrl" is not set (did you forget a leading "./"?)
    12 │         "src/*"

Before submitting the issue, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Provide a description in this issue that describes the bug.
  • Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
@bluwy
Copy link
Member

bluwy commented Mar 11, 2022

I can reproduce the issue after cloning the repro repo, installing "@1stg/tsconfig (missing dep), and run pnpm build (to run vue-tsc). This seems like an issue in vue-tsc, please open an issue there.

@JounQin
Copy link
Contributor Author

JounQin commented Mar 21, 2022

@bluwy It seems the author of vue-tsc thinks it's Vite's issue still.

@JounQin
Copy link
Contributor Author

JounQin commented Mar 21, 2022

Run yarn vite will also emit this warning, not related to vue-tsc.

@bluwy
Copy link
Member

bluwy commented Mar 21, 2022

My bad. I managed to tracked it down, and it seems to be a warning logged by esbuild when Vite bundles the config file with it here. It would be an issue with esbuild then, not sure if it's a bug or an intentional behaviour.

@JounQin
Copy link
Contributor Author

JounQin commented Mar 21, 2022

OK, it seems warning from https://github.com/evanw/esbuild/blob/master/internal/resolver/tsconfig_json.go#L319

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants