Feature Request l ESM .js extension
Closed this issue · 2 comments
carlocorradini commented
Add a feature flag that enables ESM relative imports with file extensions ending in ".js
"
Before:
import { A } from "./B";
After (e.g. esm
feature flag):
import { A } from "./B.js";
The implementation of this should be simple.
escritorio-gustavo commented
You know, I've been thinking back on this particular feature... Does it actually do anything?
I mean, ts-rs
exports only type declarations, so these imports (or even the whole file) should be removed by tsc
when compiling to JS right?
escritorio-gustavo commented
Maybe we should have done this instead:
import type { A } from "./B";