oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.36k stars 2.78k forks source link

stricter bundler support for `verbatimModuleSyntax` #12744

Open huseeiin opened 4 months ago

huseeiin commented 4 months ago

What is the problem this feature would solve?

Given this:

// test.ts

import { BunFile } from "bun";

bun build test.ts with "verbatimModuleSyntax": true should throw an error that says "Cannot find export BunFile in module bun"

What is the feature you are proposing to solve the problem?

this would fully support verbatimModuleSyntax intended behavior.

What alternatives have you considered?

No response

huseeiin commented 4 months ago

this is proposed for bundler, but after thinknig about it, it can also work in runtime