-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Unable to use "tsconfig.json"'s "extends" key with yarn3 #8357
Comments
The error comes from esbuild and it was reproducible only with esbuild. You could create an issue at esbuild repository but it seems it won't be supported (evanw/esbuild#237). |
Thank you for pointing me to Inside of import { pnpPlugin } from '@yarnpkg/esbuild-plugin-pnp';
export default defineConfig({
...
optimizeDeps: {
esbuildOptions: {
plugins: [pnpPlugin()]
}
}
}) however, I'm still seeing the warning described in the issue. If instead I have // build.js
const { pnpPlugin } = require('@yarnpkg/esbuild-plugin-pnp')
require('esbuild').build({
entryPoints: ['./src/App.tsx'],
bundle: true,
outfile: 'out.js',
plugins: [pnpPlugin()]
}).catch(() => process.exit(1)) and run I also only run into this issue when |
I suppose |
I think there is a conflict with #1688 Shouldn't we use |
The warning is about the tsconfig for local files, not optimized dependencies. So neither Local files are processed by Vite loads tsconfigs itself and passes compilerOptions to esbuild.transform. However, for So the warning actually is purely about Note that adding esbuild-plugin-pnp here won't help. ESBuild Plugin API does not allow customization of tsconfig loading. The only possible fix on Vite side for now is to use the same approach that the main bundling process uses — that is, use ESBuild transform API and load tsconfigs beforehand. Here's a suggestion for adding config loading customization via plugin API I've submitted in ESBuild repo some time ago evanw/esbuild#2095 |
Oh, I see. |
I'm not sure if an issue in yarn3 justifies changing how Vite loads |
By the way, to avoid the error (even if it doesn't affect anything), you can run |
|
Describe the bug
I'd like to extend a re-usable
tsconfig.json
(e.g, https://www.npmjs.com/package/@tsconfig/recommended). When adding the option"extends": "@tsconfig/recommended"
to mytsconfig.json
inside a Vite project (using vite's react + ts starter) and runningyarn build
I get:Reproduction
https://github.com/Alex-Yakubovsky/vite-error-repo
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: