Skip to content

fix(tsx loader): can't find esbuild config (parentURL unavailable in load hook) - #54

Closed
AugustinMauroy wants to merge 9 commits into
mainfrom
fix-tsx
Closed

AugustinMauroy wants to merge 9 commits into
mainfrom
fix-tsx

Conversation

@AugustinMauroy

Copy link
Copy Markdown
Member

No description provided.

@JakobJingleheimer JakobJingleheimer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for discovering and jumping on this!

Comment thread e2e-tsx/package.json Outdated
Comment thread e2e-tsx/e2e.mjs Outdated
Comment thread e2e-tsx/e2e.mjs Outdated
Comment thread e2e-tsx/esbuild.config.mjs Outdated
Comment thread e2e-tsx/fixture.jsx
Comment thread packages/tsx/find-esbuild-config.mjs Outdated
Comment thread packages/tsx/package.json
Comment thread packages/tsx/tsx.mjs Outdated
Comment thread packages/tsx/tsx.mjs Outdated
Comment thread packages/tsx/tsx.mjs Outdated
AugustinMauroy and others added 2 commits December 14, 2024 22:14
Co-Authored-By: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com>
@AugustinMauroy

AugustinMauroy commented Dec 14, 2024 •

Copy link
Copy Markdown
Member Author

now it's look good for me. But there are still the issue with findPackageJSON(). Also code style will be fixed by BiomeJS.
Still need to figure out, how to fix test. Can we mock findPackgaJSON for now ? to have green CI ?

@AugustinMauroy
AugustinMauroy marked this pull request as ready for review December 14, 2024 21:25
@JakobJingleheimer JakobJingleheimer changed the title fix: parentURL fix(tsx loader): can't find esbuild config (parentURL unavailable in load hook) Dec 15, 2024
Comment thread package.json
Comment thread .github/workflows/ci.yml Outdated
AugustinMauroy and others added 2 commits December 15, 2024 22:06
this still doesn't work because of a bug in `findPackageJSON` where `cascadedLoader.resolve` returns a promise when there are async resolve hooks in the chain.

this is especially problematic from within a loader because we can't use Atomics magic: we're _already_ in the hooks thread.
@JakobJingleheimer

JakobJingleheimer commented Dec 18, 2024 •

Copy link
Copy Markdown
Member

This is caused by a bug in node's findPackageJSON. I believe there is no change needed to this loader once that bug is fixed.

Edit: nodejs/node#56382

@AugustinMauroy

Copy link
Copy Markdown
Member Author

close in favor for #70

@JakobJingleheimer
JakobJingleheimer deleted the fix-tsx branch January 5, 2025 18:44
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

Successfully merging this pull request may close these issues.

2 participants