Skip to content
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

$configDir may not be working correctly #3812

Closed
ICJR opened this issue Jun 24, 2024 · 2 comments
Closed

$configDir may not be working correctly #3812

ICJR opened this issue Jun 24, 2024 · 2 comments

Comments

@ICJR
Copy link

ICJR commented Jun 24, 2024

I believe esbuild-loader is not working correctly with $configDir.

  • I'm using the implementation configuration option to bring the latest esbuild package to webpack.
  • Typescript base config https://github.com/esportsplus/typescript/blob/main/tsconfig.base.json
  • When I extend from another project I do not receive TS errors but when I attempt to bundle I receive cannot find ./src/* file.
  • If I update the child tsconfig baseUrl and set to . everything works correctly.
  • If I remove ${configDir} from include config, esbuild/webpack build doesn`t throw errors but TS does.

Based on #3782 I believe you applied $configDir for paths configuration only, I believe it applies to any path defined within tsconfig ( including exclude and include ).

@ICJR ICJR changed the title $configDir may not be working correctly $configDir may not be working correctly Jun 24, 2024
@evanw
Copy link
Owner

evanw commented Jun 24, 2024

I believe esbuild-loader is not working correctly with $configDir.

This may be a bug with esbuild-loader instead of with esbuild. Please provide a way to reproduce the issue here that uses esbuild (not esbuild-loader). Note that this is the esbuild repo and esbuild-loader is a separate project (which you can find here). This repo has nothing to do with Webpack.

Based on #3782 I believe you applied $configDir for paths configuration only, I believe it applies to any path defined within tsconfig ( including exclude and include ).

The exclude and include fields are not used by esbuild's bundler: https://esbuild.github.io/content-types/#tsconfig-json. So it would be meaningless for esbuild to apply $configDir to them as it wouldn't have any effect on anything that esbuild does.

@ICJR
Copy link
Author

ICJR commented Jun 24, 2024

Gotcha, I assumed it had something to do with the bundling package. Thank you.

@ICJR ICJR closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants