diff --git a/src/node/NodeBasisEncoder.ts b/src/node/NodeBasisEncoder.ts index db96b85..82f6020 100644 --- a/src/node/NodeBasisEncoder.ts +++ b/src/node/NodeBasisEncoder.ts @@ -1,5 +1,5 @@ -import { IBasisModule, IEncodeOptions, SourceType } from "../type"; -import { applyInputOptions } from "../utils"; +import { IBasisModule, IEncodeOptions, SourceType } from "../type.js"; +import { applyInputOptions } from "../utils.js"; import BASIS from "./basis/basis_encoder.js"; let promise: Promise | null = null; diff --git a/src/node/index.ts b/src/node/index.ts index 0c3385c..da1948a 100644 --- a/src/node/index.ts +++ b/src/node/index.ts @@ -1,5 +1,5 @@ -import { IEncodeOptions } from "../type"; -import { nodeEncoder } from "./NodeBasisEncoder"; +import { IEncodeOptions } from "../type.js"; +import { nodeEncoder } from "./NodeBasisEncoder.js"; export function encodeToKTX2(imageBuffer: Uint8Array, options: Partial = {}): Promise { if (!options.imageDecoder) { diff --git a/src/utils.ts b/src/utils.ts index de08aa8..3b1c8fd 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,4 @@ -import { IBasisEncoder, IEncodeOptions } from "./type"; +import { IBasisEncoder, IEncodeOptions } from "./type.js"; export const DefaultOptions = { enableDebug: false, diff --git a/src/web/BrowserBasisEncoder.ts b/src/web/BrowserBasisEncoder.ts index 4747856..d375530 100644 --- a/src/web/BrowserBasisEncoder.ts +++ b/src/web/BrowserBasisEncoder.ts @@ -1,6 +1,6 @@ import { read, write } from "ktx-parse"; -import { BasisTextureType, IBasisModule, IEncodeOptions, SourceType } from "../type"; -import { applyInputOptions } from "../utils"; +import { BasisTextureType, IBasisModule, IEncodeOptions, SourceType } from "../type.js"; +import { applyInputOptions } from "../utils.js"; declare function importScripts(...args: any): any; diff --git a/src/web/index.ts b/src/web/index.ts index 1d279a4..5cb8c8e 100644 --- a/src/web/index.ts +++ b/src/web/index.ts @@ -1,6 +1,6 @@ -import { IEncodeOptions } from "../type"; -import { browserEncoder } from "./BrowserBasisEncoder"; -import { decodeImageBitmap } from "./decodeImageData"; +import { IEncodeOptions } from "../type.js"; +import { browserEncoder } from "./BrowserBasisEncoder.js"; +import { decodeImageBitmap } from "./decodeImageData.js"; export function encodeToKTX2(imageBuffer: Uint8Array, options: Partial = {}): Promise { options.imageDecoder ??= decodeImageBitmap; diff --git a/tsconfig.json b/tsconfig.json index e6a58bb..4c14461 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,11 +3,11 @@ "target": "ES2020", "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", + "module": "NodeNext", "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "NodeNext", "allowImportingTsExtensions": false, "resolveJsonModule": true, "isolatedModules": true,