diff --git a/package.json b/package.json index 412677a..315664c 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "format:check": "prettier --check .", "lint": "eslint src/**/*.ts", "lint:fix": "npm run lint -- --fix", - "build": "vite build && esbuild $(find ./src -name \"*.ts\" -type f -not -path '*worker/index.ts' -not -path '*.spec.ts') --outdir=./dist --platform=neutral --format=esm", + "build": "vite build && esbuild $(find ./src -name \"*.ts\" -type f -not -path '*worker/index.ts' -not -path '*.spec.ts') --outdir=./dist --platform=neutral --format=esm --sourcemap", "prepublishOnly": "npm run typecheck && npm test && npm run build", "typecheck": "tsc --noEmit", "docs": "typedoc src/index.ts --json app/src/data/api.json --pretty --excludePrivate" diff --git a/src/index.ts b/src/index.ts index 811299e..6e4edbb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -export { default as WfsEndpoint } from './wfs/endpoint'; +export { default as WfsEndpoint } from './wfs/endpoint.js'; export type { WfsVersion, WfsFeatureWithProps, @@ -10,36 +10,36 @@ export type { WfsFeatureTypePropDetails, WfsFeatureTypePropsDetails, WfsFeatureTypeUniqueValue, -} from './wfs/model'; -export { default as WmsEndpoint } from './wms/endpoint'; +} from './wfs/model.js'; +export { default as WmsEndpoint } from './wms/endpoint.js'; export type { WmsLayerFull, WmsVersion, WmsLayerSummary, WmtsLayerAttribution, -} from './wms/model'; -export { default as WmtsEndpoint } from './wmts/endpoint'; +} from './wms/model.js'; +export { default as WmtsEndpoint } from './wmts/endpoint.js'; export type { WmtsLayerDimensionValue, WmtsLayerResourceLink, WmtsEndpointInfo, WmtsLayer, WmtsMatrixSet, -} from './wmts/model'; +} from './wmts/model.js'; export type { LayerStyle, BoundingBox, FetchOptions, GenericEndpointInfo, -} from './shared/models'; -export { default as OgcApiEndpoint } from './ogc-api/endpoint'; -export * from './ogc-api/model'; -export { useCache } from './shared/cache'; +} from './shared/models.js'; +export { default as OgcApiEndpoint } from './ogc-api/endpoint.js'; +export * from './ogc-api/model.js'; +export { useCache } from './shared/cache.js'; export { sharedFetch, setFetchOptions, resetFetchOptions, -} from './shared/http-utils'; +} from './shared/http-utils.js'; -export { enableFallbackWithoutWorker } from './worker/index'; -import './worker-fallback'; +export { enableFallbackWithoutWorker } from './worker/index.js'; +import './worker-fallback/index.js';