@@ -16,7 +16,6 @@ import type {
1616 PluginBuild ,
1717} from 'esbuild' ;
1818import assert from 'node:assert' ;
19- import { realpathSync } from 'node:fs' ;
2019import * as path from 'node:path' ;
2120import { maxWorkers } from '../../../utils/environment-options' ;
2221import { JavaScriptTransformer } from '../javascript-transformer' ;
@@ -57,18 +56,6 @@ export function createCompilerPlugin(
5756 let setupWarnings : PartialMessage [ ] | undefined = [ ] ;
5857 const preserveSymlinks = build . initialOptions . preserveSymlinks ;
5958
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-
7259 // Initialize a worker pool for JavaScript transformations
7360 const javascriptTransformer = new JavaScriptTransformer ( pluginOptions , maxWorkers ) ;
7461
@@ -240,7 +227,7 @@ export function createCompilerPlugin(
240227 let referencedFiles ;
241228 try {
242229 const initializationResult = await compilation . initialize (
243- tsconfigPath ,
230+ pluginOptions . tsconfig ,
244231 hostOptions ,
245232 createCompilerOptionsTransformer ( setupWarnings , pluginOptions , preserveSymlinks ) ,
246233 ) ;
0 commit comments