diff --git a/src/index.test.ts b/src/index.test.ts index 24b6a2e..3f47feb 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1,7 +1,7 @@ import { test } from "node:test"; import { strict as assert } from "node:assert"; import { expectTypeOf } from "expect-type"; -import { match, P, type Matcher } from "./index.js"; +import { match, P, type Matcher } from "./index.ts"; test("match returns a builder", () => { const builder = match("x"); diff --git a/src/index.ts b/src/index.ts index 970ea6a..20f0ec7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ -export { match, P } from "./match.js"; -export type { Matcher, Pattern } from "./pattern.js"; +export { match, P } from "./match.ts"; +export type { Matcher, Pattern } from "./pattern.ts"; diff --git a/src/match.ts b/src/match.ts index 6487acb..a7b6c84 100644 --- a/src/match.ts +++ b/src/match.ts @@ -1,4 +1,4 @@ -import { P, type Matcher, type Pattern } from "./pattern.js"; +import { P, type Matcher, type Pattern } from "./pattern.ts"; type Cases = ReadonlyArray< readonly [Matcher, (value: unknown) => R] diff --git a/tsconfig.build.json b/tsconfig.build.json index dd7d10f..2342359 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "noEmit": false, + "rewriteRelativeImportExtensions": true, "rootDir": "src", "outDir": "dist" }, diff --git a/tsconfig.json b/tsconfig.json index e5c3c91..e3bea47 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,7 @@ "noUnusedParameters": true, "isolatedModules": true, "verbatimModuleSyntax": true, + "allowImportingTsExtensions": true, "declaration": true, "declarationMap": true, "sourceMap": true, @@ -34,4 +35,4 @@ "types": ["node"] }, "include": ["src"] -} \ No newline at end of file +}