Closed DylanPiercey closed 6 months ago
Latest commit: d4d433f89a76bb80b0b0223cc98262d2fd210a90
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Description
When using
@marko/type-check
to emit js files for a native es module package the output files will not have the resolved extension included for relative imports.This is actually a TypeScript design that they say is working as intended: https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-specifiers-are-not-transformed
However besides being very strange to import non existing
.js
files, it also doesn't work injest
,vite
,vitest
,webpack
,rollup
, oresbuild
.So this PR handles it for you. With this change
.js
extensions are automatically added to output relative import paths.