Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
eurasiantiger
on Jan 30, 2023
|
parent
|
context
|
favorite
| on:
Ask HN: Why does every package+module system becom...
Just use .mjs extension for your code, add extensions to your imports and everything does just work.
noahtallen
on Jan 30, 2023
[–]
Except in typescript, where you have to import a file with the .js extension, despite the actual file being .ts:
https://github.com/microsoft/TypeScript/issues/42151
,
https://github.com/microsoft/TypeScript/issues/49083
,
https://github.com/microsoft/TypeScript/issues/16577
This one issue (IMO) is preventing parts of the ecosystem from switching to esm.
mhio
on Jan 31, 2023
|
parent
[–]
How does the js extension stop a project from targeting ESM?
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: