-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
tsconfig useDefineForClassFields setting not respected #3227
Comments
Same here. This also seems to break some MobX functionality . |
According to ESBuild documentation, the transform API does not access the file system, so it can't automatically discover the |
On the other hand, I think this API design in ESBuild is quite confusing. Why does it accept a path string in the |
A note: in TypeScript 4.3, |
Describe the bug
My project requires use of setting
useDefineForClassFields: true
in tsconfig.json. For some reason the output presented bynpm run dev
behaves like that setting was set tofalse
.Reproduction
Create from React-TypeScript template (
npm init @vitejs/app my-app -- --template react-ts
) and add following code to App.tsxand inside
App()
:It should console.log two lines when
useDefineForClassFields
set totrue
intsconfig.json
. (It works that way executed under webpack+babel or webpack+esbuild)System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm
The text was updated successfully, but these errors were encountered: