File tree Expand file tree Collapse file tree
packages/vite/src/node/plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ export async function transformWithEsbuild(
8181 // these fields would affect the compilation result
8282 // https://esbuild.github.io/content-types/#tsconfig-json
8383 const meaningfulFields : Array < keyof TSCompilerOptions > = [
84+ 'target' ,
8485 'jsxFactory' ,
8586 'jsxFragmentFactory' ,
8687 'useDefineForClassFields' ,
@@ -98,17 +99,9 @@ export async function transformWithEsbuild(
9899 compilerOptionsForFile [ field ] = loadedCompilerOptions [ field ]
99100 }
100101 }
101-
102- // align with TypeScript 4.3
103- // https://github.com/microsoft/TypeScript/pull/42663
104- if ( loadedCompilerOptions . target ?. toLowerCase ( ) === 'esnext' ) {
105- compilerOptionsForFile . useDefineForClassFields =
106- loadedCompilerOptions . useDefineForClassFields ?? true
107- }
108102 }
109103
110104 tsconfigRaw = {
111- ...tsconfigRaw ,
112105 compilerOptions : {
113106 ...compilerOptionsForFile ,
114107 ...tsconfigRaw ?. compilerOptions
You can’t perform that action at this time.
0 commit comments