diff --git a/src/DapiMixin.ts b/src/DapiMixin.ts index 5b85c3f..12104f8 100644 --- a/src/DapiMixin.ts +++ b/src/DapiMixin.ts @@ -1,5 +1,5 @@ -import {Constructor, ExtractFirstParam} from './types/utils'; -import {DapiFns, DecoratorFn, HookFn} from './types'; +import {Constructor, ExtractFirstParam} from './types/utils.js'; +import {DapiFns, DecoratorFn, HookFn} from './types/index.js'; /** * Represents an DAPI definition with dependencies and pure functions. diff --git a/src/createDapi.ts b/src/createDapi.ts index a4039ed..bc94650 100644 --- a/src/createDapi.ts +++ b/src/createDapi.ts @@ -1,6 +1,6 @@ -import {DapiMixin, DapiDefinition} from './DapiMixin'; -import {DapiFns} from './types'; -import {Constructor} from './types/utils'; +import {DapiMixin, DapiDefinition} from './DapiMixin.js'; +import type {DapiFns} from './types/index.js'; +import {Constructor} from './types/utils.js'; /** * Creates an Dapi facade. diff --git a/src/index.ts b/src/index.ts index d1ffc92..5050728 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ /** * @module @carpasse/dapi */ -export {DapiMixin, type DapiDefinition, type DapiWrapper} from './DapiMixin'; +export {DapiMixin, type DapiDefinition, type DapiWrapper} from './DapiMixin.js'; export type {DapiFns, DapiFn, DecoratorFn, HookFn} from './types'; -export {createDapi} from './createDapi'; +export {createDapi} from './createDapi.js'; diff --git a/src/types/index.ts b/src/types/index.ts index 1dd29e9..86dd31d 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,4 +1,4 @@ -import {AnyFunction} from './utils'; +import {AnyFunction} from './utils.js'; /** * Dapi function type. It is a function that receives the dependencies as the first argument. diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 12732e9..7680e2f 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -3,6 +3,7 @@ "compilerOptions": { "declaration": true, "declarationDir": "./dist/esm", - "outDir": "./dist/esm" + "outDir": "./dist/esm", + "module": "esnext" } }