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

Using with {type: text} returns an error #13663

Closed
art-santos opened this issue Sep 1, 2024 · 1 comment
Closed

Using with {type: text} returns an error #13663

art-santos opened this issue Sep 1, 2024 · 1 comment
Labels
bug Something isn't working typescript Something for TypeScript

Comments

@art-santos
Copy link

What version of Bun is running?

1.1.10 5102a9443

What platform is your computer?

MAC M2

What steps can reproduce the bug?

Start an app with bun as in (https://bun.sh/)

Copy the code for fetching and rendering an HTML local file in your app like in (https://bun.sh/guides/runtime/import-html)

What is the expected behavior?

with { type: "text" };
shouldn't return

Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'.ts(2823)

What do you see instead?

No response

Additional information

To solve it add to

tsconfig.ts

{ "compilerOptions": { "module": "preserve", } }
or

{ "compilerOptions": { "module": "ESNext", } }

@art-santos art-santos added bug Something isn't working typescript Something for TypeScript labels Sep 1, 2024
@Jarred-Sumner
Copy link
Collaborator

Unfortunately, it's not clear there's much we can do about this without help from TypeScript upstream.

Related issue: microsoft/TypeScript#46135

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typescript Something for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants