@@ -16,7 +16,6 @@ import type {
16
16
PluginBuild ,
17
17
} from 'esbuild' ;
18
18
import assert from 'node:assert' ;
19
- import { realpathSync } from 'node:fs' ;
20
19
import * as path from 'node:path' ;
21
20
import { maxWorkers } from '../../../utils/environment-options' ;
22
21
import { JavaScriptTransformer } from '../javascript-transformer' ;
@@ -57,18 +56,6 @@ export function createCompilerPlugin(
57
56
let setupWarnings : PartialMessage [ ] | undefined = [ ] ;
58
57
const preserveSymlinks = build . initialOptions . preserveSymlinks ;
59
58
60
- let tsconfigPath = pluginOptions . tsconfig ;
61
- if ( ! preserveSymlinks ) {
62
- // Use the real path of the tsconfig if not preserving symlinks.
63
- // This ensures the TS source file paths are based on the real path of the configuration.
64
- // NOTE: promises.realpath should not be used here since it uses realpath.native which
65
- // can cause case conversion and other undesirable behavior on Windows systems.
66
- // ref: https://github.com/nodejs/node/issues/7726
67
- try {
68
- tsconfigPath = realpathSync ( tsconfigPath ) ;
69
- } catch { }
70
- }
71
-
72
59
// Initialize a worker pool for JavaScript transformations
73
60
const javascriptTransformer = new JavaScriptTransformer ( pluginOptions , maxWorkers ) ;
74
61
@@ -240,7 +227,7 @@ export function createCompilerPlugin(
240
227
let referencedFiles ;
241
228
try {
242
229
const initializationResult = await compilation . initialize (
243
- tsconfigPath ,
230
+ pluginOptions . tsconfig ,
244
231
hostOptions ,
245
232
createCompilerOptionsTransformer ( setupWarnings , pluginOptions , preserveSymlinks ) ,
246
233
) ;
0 commit comments