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

Deno compat/bypass for Jiti #168

Open
birkskyum opened this issue Sep 21, 2023 · 3 comments
Open

Deno compat/bypass for Jiti #168

birkskyum opened this issue Sep 21, 2023 · 3 comments

Comments

@birkskyum
Copy link

Environment

Similar to bun here

It would be great to have a bypass for Deno.

Reproduction

Repro here

Describe the bug

Jiti should not try to compile typescript when using Deno

Additional context

No response

Logs

No response

@pi0
Copy link
Member

pi0 commented Sep 21, 2023

Hi dear @birkskyum thanks for opening issue but i am wondering does deno has same Node.js compatibility surface of Bun? (does it support mixed ESM/CJS and importing other files without .ts extension?)

@birkskyum
Copy link
Author

birkskyum commented Sep 21, 2023

Good question. Actually, I believe it's more picky. It does support CJS modules, but if I understand the announcement made that is only if they are used inside dependencies imported through a npm: specifier, and probably not mixed with esm. I'm not 100% sure what the best approach to jiti support is, but deno is at a point with npm/node compat where it makes sense now to figure out how to improve the story for local development, and here jiti does break some things - but the needed changes may very well be on the deno side.

@pi0
Copy link
Member

pi0 commented Sep 21, 2023

Surely! We might also use a deno-specific ast transformer to handle necessary transformations (add extension, remap modules, etc) if that's what is needed on jiti side I'm totally up to it (only is a pitty because this way, Deno usage will be slower but i respect all reasons Deno runtime chose to keep stricter with ESM standards and disallow mixed syntaxes)

@birkskyum while you are here, are you also in UnJS discord channel? If not and like to work closely, my handle is @pi0 feel free to DM me for invite 👍🏼

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